Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
6e728e40
Commit
6e728e40
authored
Feb 27, 2004
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Feb 27, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Convert MCIAVI window support to unicode.
Allow multiple simultaneous MCIAVI driver instances.
parent
05ba4b48
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
18 deletions
+24
-18
wnd.c
dlls/winmm/mciavi/wnd.c
+24
-18
No files found.
dlls/winmm/mciavi/wnd.c
View file @
6e728e40
...
...
@@ -27,19 +27,21 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
mciavi
);
static
const
WCHAR
mciaviW
[]
=
{
'M'
,
'C'
,
'I'
,
'A'
,
'V'
,
'I'
,
0
};
static
LRESULT
WINAPI
MCIAVI_WindowProc
(
HWND
hWnd
,
UINT
uMsg
,
WPARAM
wParam
,
LPARAM
lParam
)
{
TRACE
(
"hwnd=%p msg=%x wparam=%x lparam=%lx
\n
"
,
hWnd
,
uMsg
,
wParam
,
lParam
);
switch
(
uMsg
)
{
case
WM_CREATE
:
SetWindowLongA
(
hWnd
,
0
,
(
LPARAM
)((
CREATESTRUCTA
*
)
lParam
)
->
lpCreateParams
);
return
DefWindowProcA
(
hWnd
,
uMsg
,
wParam
,
lParam
);
SetWindowLongW
(
hWnd
,
0
,
(
LPARAM
)((
CREATESTRUCTW
*
)
lParam
)
->
lpCreateParams
);
return
DefWindowProcW
(
hWnd
,
uMsg
,
wParam
,
lParam
);
case
WM_DESTROY
:
MCIAVI_mciClose
(
GetWindowLong
A
(
hWnd
,
0
),
MCI_WAIT
,
NULL
);
SetWindowLongA
(
hWnd
,
0
,
0
);
return
DefWindowProcA
(
hWnd
,
uMsg
,
wParam
,
lParam
);
MCIAVI_mciClose
(
GetWindowLong
W
(
hWnd
,
0
),
MCI_WAIT
,
NULL
);
SetWindowLongW
(
hWnd
,
0
,
0
);
return
DefWindowProcW
(
hWnd
,
uMsg
,
wParam
,
lParam
);
case
WM_ERASEBKGND
:
{
...
...
@@ -51,10 +53,10 @@ static LRESULT WINAPI MCIAVI_WindowProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPA
case
WM_PAINT
:
{
WINE_MCIAVI
*
wma
=
(
WINE_MCIAVI
*
)
mciGetDriverData
(
GetWindowLong
A
(
hWnd
,
0
));
WINE_MCIAVI
*
wma
=
(
WINE_MCIAVI
*
)
mciGetDriverData
(
GetWindowLong
W
(
hWnd
,
0
));
if
(
!
wma
)
return
DefWindowProc
A
(
hWnd
,
uMsg
,
wParam
,
lParam
);
return
DefWindowProc
W
(
hWnd
,
uMsg
,
wParam
,
lParam
);
EnterCriticalSection
(
&
wma
->
cs
);
...
...
@@ -63,7 +65,7 @@ static LRESULT WINAPI MCIAVI_WindowProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPA
{
LeaveCriticalSection
(
&
wma
->
cs
);
/* default paint handling */
return
DefWindowProcA
(
hWnd
,
uMsg
,
wParam
,
lParam
);
return
DefWindowProcW
(
hWnd
,
uMsg
,
wParam
,
lParam
);
}
if
(
wParam
)
...
...
@@ -81,34 +83,38 @@ static LRESULT WINAPI MCIAVI_WindowProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPA
return
1
;
default:
return
DefWindowProcA
(
hWnd
,
uMsg
,
wParam
,
lParam
);
return
DefWindowProcW
(
hWnd
,
uMsg
,
wParam
,
lParam
);
}
return
0
;
}
BOOL
MCIAVI_UnregisterClass
(
void
)
{
return
UnregisterClass
A
(
"MCIAVI"
,
MCIAVI_hInstance
);
return
UnregisterClass
W
(
mciaviW
,
MCIAVI_hInstance
);
}
BOOL
MCIAVI_RegisterClass
(
void
)
{
WNDCLASS
A
wndClass
;
WNDCLASS
W
wndClass
;
ZeroMemory
(
&
wndClass
,
sizeof
(
WNDCLASS
A
));
ZeroMemory
(
&
wndClass
,
sizeof
(
WNDCLASS
W
));
wndClass
.
style
=
CS_DBLCLKS
;
wndClass
.
lpfnWndProc
=
(
WNDPROC
)
MCIAVI_WindowProc
;
wndClass
.
lpfnWndProc
=
MCIAVI_WindowProc
;
wndClass
.
cbWndExtra
=
sizeof
(
MCIDEVICEID
);
wndClass
.
hInstance
=
MCIAVI_hInstance
;
wndClass
.
hCursor
=
LoadCursorA
(
0
,
(
LPSTR
)
IDC_ARROW
);
wndClass
.
hbrBackground
=
(
HBRUSH
)(
COLOR_BTNFACE
+
1
);
wndClass
.
lpszClassName
=
"MCIAVI"
;
wndClass
.
hCursor
=
LoadCursorW
(
0
,
(
LPCWSTR
)
IDC_ARROW
);
wndClass
.
hbrBackground
=
(
HBRUSH
)(
COLOR_3DFACE
+
1
);
wndClass
.
lpszClassName
=
mciaviW
;
if
(
RegisterClassW
(
&
wndClass
))
return
TRUE
;
if
(
GetLastError
()
==
ERROR_CLASS_ALREADY_EXISTS
)
return
TRUE
;
return
RegisterClassA
(
&
wndClass
)
;
return
FALSE
;
}
BOOL
MCIAVI_CreateWindow
(
WINE_MCIAVI
*
wma
,
DWORD
dwFlags
,
LPMCI_DGV_OPEN_PARMSA
lpOpenParms
)
{
static
const
WCHAR
captionW
[]
=
{
'W'
,
'i'
,
'n'
,
'e'
,
' '
,
'M'
,
'C'
,
'I'
,
'-'
,
'A'
,
'V'
,
'I'
,
' '
,
'p'
,
'l'
,
'a'
,
'y'
,
'e'
,
'r'
,
0
};
HWND
hParent
=
0
;
DWORD
dwStyle
=
WS_OVERLAPPEDWINDOW
;
int
p
=
CW_USEDEFAULT
;
...
...
@@ -127,7 +133,7 @@ BOOL MCIAVI_CreateWindow(WINE_MCIAVI* wma, DWORD dwFlags, LPMCI_DGV_OPEN_PARM
rc
.
bottom
=
(
wma
->
hic
?
wma
->
outbih
:
wma
->
inbih
)
->
biHeight
;
AdjustWindowRect
(
&
rc
,
dwStyle
,
FALSE
);
wma
->
hWnd
=
CreateWindow
A
(
"MCIAVI"
,
"Wine MCI-AVI player"
,
wma
->
hWnd
=
CreateWindow
W
(
mciaviW
,
captionW
,
dwStyle
,
rc
.
left
,
rc
.
top
,
rc
.
right
,
rc
.
bottom
,
hParent
,
0
,
MCIAVI_hInstance
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment