ReactOS 0.4.15-dev-8348-gc1b9bb5
mciwnd.c File Reference
#include <stdarg.h>
#include "windef.h"
#include "winbase.h"
#include "winnls.h"
#include "wingdi.h"
#include "winuser.h"
#include "winternl.h"
#include "vfw.h"
#include "digitalv.h"
#include "commctrl.h"
#include "wine/debug.h"
Include dependency graph for mciwnd.c:

Go to the source code of this file.

Classes

struct  MCIWndInfo
 

Macros

#define CTL_PLAYSTOP   0x3200
 
#define CTL_MENU   0x3201
 
#define CTL_TRACKBAR   0x3202
 

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (mci)
 
static LRESULT WINAPI MCIWndProc (HWND hWnd, UINT wMsg, WPARAM wParam, LPARAM lParam)
 
BOOL VFWAPIV MCIWndRegisterClass (void)
 
HWND VFWAPIV MCIWndCreateW (HWND hwndParent, HINSTANCE hInstance, DWORD dwStyle, LPCWSTR szFile)
 
HWND VFWAPIV MCIWndCreateA (HWND hwndParent, HINSTANCE hInstance, DWORD dwStyle, LPCSTR szFile)
 
static void MCIWND_notify_mode (MCIWndInfo *mwi)
 
static void MCIWND_notify_pos (MCIWndInfo *mwi)
 
static void MCIWND_notify_size (MCIWndInfo *mwi)
 
static void MCIWND_notify_error (MCIWndInfo *mwi)
 
static void MCIWND_UpdateState (MCIWndInfo *mwi)
 
static LRESULT MCIWND_Create (HWND hWnd, LPCREATESTRUCTW cs)
 
static void MCIWND_ToggleState (MCIWndInfo *mwi)
 
static LRESULT MCIWND_Command (MCIWndInfo *mwi, WPARAM wParam, LPARAM lParam)
 
static void MCIWND_notify_media (MCIWndInfo *mwi)
 
static MCIERROR mci_generic_command (MCIWndInfo *mwi, UINT cmd)
 
static LRESULT mci_get_devcaps (MCIWndInfo *mwi, UINT cap)
 
static LRESULT MCIWND_KeyDown (MCIWndInfo *mwi, UINT key)
 

Variables

HMODULE MSVFW32_hModule
 
static const WCHAR mciWndClassW [] = {'M','C','I','W','n','d','C','l','a','s','s',0}
 

Macro Definition Documentation

◆ CTL_MENU

#define CTL_MENU   0x3201

Definition at line 64 of file mciwnd.c.

◆ CTL_PLAYSTOP

#define CTL_PLAYSTOP   0x3200

Definition at line 63 of file mciwnd.c.

◆ CTL_TRACKBAR

#define CTL_TRACKBAR   0x3202

Definition at line 65 of file mciwnd.c.

Function Documentation

◆ mci_generic_command()

static MCIERROR mci_generic_command ( MCIWndInfo mwi,
UINT  cmd 
)
static

Definition at line 401 of file mciwnd.c.

402{
403 MCI_GENERIC_PARMS mci_generic;
404
405 mci_generic.dwCallback = 0;
406 mwi->lasterror = mciSendCommandW(mwi->mci, cmd, 0, (DWORD_PTR)&mci_generic);
407
408 if (mwi->lasterror)
409 return mwi->lasterror;
410
413 return 0;
414}
static void MCIWND_UpdateState(MCIWndInfo *mwi)
Definition: mciwnd.c:181
static void MCIWND_notify_mode(MCIWndInfo *mwi)
Definition: mciwnd.c:143
DWORD WINAPI mciSendCommandW(MCIDEVICEID wDevID, UINT wMsg, DWORD_PTR dwParam1, DWORD_PTR dwParam2)
Definition: mci.c:2273
MCIDEVICEID mci
Definition: mciwnd.c:45
MCIERROR lasterror
Definition: mciwnd.c:56
Definition: ftp_var.h:139
DWORD_PTR dwCallback
Definition: mmsystem.h:1517
uint32_t DWORD_PTR
Definition: typedefs.h:65

Referenced by MCIWndProc().

◆ mci_get_devcaps()

static LRESULT mci_get_devcaps ( MCIWndInfo mwi,
UINT  cap 
)
static

Definition at line 416 of file mciwnd.c.

417{
418 MCI_GETDEVCAPS_PARMS mci_devcaps;
419
420 mci_devcaps.dwItem = cap;
423 (DWORD_PTR)&mci_devcaps);
424 if (mwi->lasterror)
425 return 0;
426
427 return mci_devcaps.dwReturn;
428}
#define MCI_GETDEVCAPS
Definition: mmsystem.h:654
#define MCI_GETDEVCAPS_ITEM
Definition: mmsystem.h:758
#define cap
Definition: glfuncs.h:226

Referenced by MCIWndProc().

◆ MCIWND_Command()

static LRESULT MCIWND_Command ( MCIWndInfo mwi,
WPARAM  wParam,
LPARAM  lParam 
)
static

Definition at line 358 of file mciwnd.c.

359{
360 switch (LOWORD(wParam))
361 {
362 case CTL_PLAYSTOP: MCIWND_ToggleState(mwi); break;
363 case CTL_MENU:
364 case CTL_TRACKBAR:
365 default:
366 FIXME("support for command %04x not implement yet\n", LOWORD(wParam));
367 }
368 return 0L;
369}
#define FIXME(fmt,...)
Definition: precomp.h:53
WPARAM wParam
Definition: combotst.c:138
#define CTL_TRACKBAR
Definition: mciwnd.c:65
#define CTL_MENU
Definition: mciwnd.c:64
#define CTL_PLAYSTOP
Definition: mciwnd.c:63
static void MCIWND_ToggleState(MCIWndInfo *mwi)
Definition: mciwnd.c:333
#define L(x)
Definition: ntvdm.h:50
#define LOWORD(l)
Definition: pedump.c:82

Referenced by MCIWndProc().

◆ MCIWND_Create()

static LRESULT MCIWND_Create ( HWND  hWnd,
LPCREATESTRUCTW  cs 
)
static

Definition at line 249 of file mciwnd.c.

250{
251 HWND hChld;
252 MCIWndInfo *mwi;
253 static const WCHAR buttonW[] = {'b','u','t','t','o','n',0};
254
255 mwi = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*mwi));
256 if (!mwi) return -1;
257
258 SetWindowLongW(hWnd, 0, (LPARAM)mwi);
259
260 mwi->dwStyle = cs->style;
261 /* There is no need to show stats if there is no caption */
262 if ((mwi->dwStyle & WS_CAPTION) != WS_CAPTION)
263 mwi->dwStyle &= ~MCIWNDF_SHOWALL;
264
265 mwi->hWnd = hWnd;
266 mwi->hwndOwner = cs->hwndParent;
267 mwi->active_timer = 500;
268 mwi->inactive_timer = 2000;
270 mwi->position = -1;
271 mwi->zoom = 100;
272
273 if (!(mwi->dwStyle & MCIWNDF_NOMENU))
274 {
275 static const WCHAR menuW[] = {'M','e','n','u',0};
276
277 hChld = CreateWindowExW(0, buttonW, menuW, WS_CHILD|WS_VISIBLE, 32, cs->cy, 32, 32,
278 hWnd, (HMENU)CTL_MENU, cs->hInstance, 0L);
279 TRACE("Get Button2: %p\n", hChld);
280 }
281
282 if (!(mwi->dwStyle & MCIWNDF_NOPLAYBAR))
283 {
285 static const WCHAR playW[] = {'P','l','a','y',0};
286
287 /* adding the other elements: play/stop button, menu button, status */
288 hChld = CreateWindowExW(0, buttonW, playW, WS_CHILD|WS_VISIBLE, 0, cs->cy, 32, 32,
289 hWnd, (HMENU)CTL_PLAYSTOP, cs->hInstance, 0L);
290 TRACE("Get Button1: %p\n", hChld);
291
292 init.dwSize = sizeof(init);
293 init.dwICC = ICC_BAR_CLASSES;
295
296 hChld = CreateWindowExW(0, TRACKBAR_CLASSW, NULL, WS_CHILD|WS_VISIBLE, 64, cs->cy, cs->cx - 64, 32,
297 hWnd, (HMENU)CTL_TRACKBAR, cs->hInstance, 0L);
298 TRACE("Get status: %p\n", hChld);
299 }
300
301 /* This sets the default window size */
303
304 if (cs->lpCreateParams)
305 {
307
308 /* MCI wnd class is prepared to be embedded as an MDI child window */
309 if (cs->dwExStyle & WS_EX_MDICHILD)
310 {
311 MDICREATESTRUCTW *mdics = cs->lpCreateParams;
312 lParam = mdics->lParam;
313 }
314 else
315 lParam = (LPARAM)cs->lpCreateParams;
316
317 /* If it's our internal class pointer, file name is a unicode string */
318 if (cs->lpszClass == mciWndClassW)
320 else
321 {
322 /* Otherwise let's try to figure out what string format is used */
323 HWND parent = cs->hwndParent;
325
327 }
328 }
329
330 return 0;
331}
HWND hWnd
Definition: settings.c:17
LPARAM lParam
Definition: combotst.c:139
BOOL WINAPI InitCommonControlsEx(const INITCOMMONCONTROLSEX *lpInitCtrls)
Definition: commctrl.c:893
#define NULL
Definition: types.h:112
#define GetProcessHeap()
Definition: compat.h:736
#define HeapAlloc
Definition: compat.h:733
#define HEAP_ZERO_MEMORY
Definition: compat.h:134
static const WCHAR mciWndClassW[]
Definition: mciwnd.c:40
static const WCHAR menuW[]
Definition: main.c:45
r parent
Definition: btrfs.c:3010
static const WCHAR buttonW[]
Definition: htmlelem.c:24
#define cs
Definition: i386-dis.c:442
if(dx< 0)
Definition: linetemp.h:194
#define MCI_CLOSE
Definition: mmsystem.h:647
#define MCI_MODE_NOT_READY
Definition: mmsystem.h:694
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
Definition: ordinal.c:63
#define WS_CHILD
Definition: pedump.c:617
#define WS_CAPTION
Definition: pedump.c:624
#define WS_VISIBLE
Definition: pedump.c:620
#define TRACKBAR_CLASSW
Definition: commctrl.h:2011
#define ICC_BAR_CLASSES
Definition: commctrl.h:60
#define TRACE(s)
Definition: solgame.cpp:4
UINT mode
Definition: mciwnd.c:49
WORD inactive_timer
Definition: mciwnd.c:58
HWND hWnd
Definition: mciwnd.c:54
WORD active_timer
Definition: mciwnd.c:58
LONG position
Definition: mciwnd.c:50
HWND hwndOwner
Definition: mciwnd.c:54
int zoom
Definition: mciwnd.c:52
DWORD dwStyle
Definition: mciwnd.c:44
#define MCIWNDF_NOMENU
Definition: vfw.h:1788
#define MCIWNDM_OPENW
Definition: vfw.h:1979
#define MCIWNDF_NOPLAYBAR
Definition: vfw.h:1786
#define MCIWNDM_OPENA
Definition: vfw.h:1967
LONG_PTR LPARAM
Definition: windef.h:208
static int init
Definition: wintirpc.c:33
#define GW_OWNER
Definition: winuser.h:766
LONG WINAPI SetWindowLongW(_In_ HWND, _In_ int, _In_ LONG)
BOOL WINAPI IsWindowUnicode(_In_ HWND)
#define WS_EX_MDICHILD
Definition: winuser.h:394
HWND WINAPI CreateWindowExW(_In_ DWORD dwExStyle, _In_opt_ LPCWSTR lpClassName, _In_opt_ LPCWSTR lpWindowName, _In_ DWORD dwStyle, _In_ int X, _In_ int Y, _In_ int nWidth, _In_ int nHeight, _In_opt_ HWND hWndParent, _In_opt_ HMENU hMenu, _In_opt_ HINSTANCE hInstance, _In_opt_ LPVOID lpParam)
HWND WINAPI GetWindow(_In_ HWND, _In_ UINT)
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
__wchar_t WCHAR
Definition: xmlstorage.h:180

Referenced by MCIWndProc().

◆ MCIWND_KeyDown()

static LRESULT MCIWND_KeyDown ( MCIWndInfo mwi,
UINT  key 
)
static

Definition at line 430 of file mciwnd.c.

431{
432 TRACE("%p, key %04x\n", mwi->hWnd, key);
433
434 switch(key)
435 {
436 case VK_ESCAPE:
437 SendMessageW(mwi->hWnd, MCI_STOP, 0, 0);
438 return 0;
439
440 default:
441 return 0;
442 }
443}
#define MCI_STOP
Definition: mmsystem.h:651
Definition: copy.c:22
#define VK_ESCAPE
Definition: winuser.h:2214

Referenced by MCIWndProc().

◆ MCIWND_notify_error()

static void MCIWND_notify_error ( MCIWndInfo mwi)
inlinestatic

Definition at line 175 of file mciwnd.c.

176{
177 if (mwi->dwStyle & MCIWNDF_NOTIFYERROR)
179}
#define MCIWNDM_NOTIFYERROR
Definition: vfw.h:1997
#define MCIWNDF_NOTIFYERROR
Definition: vfw.h:1797
UINT_PTR WPARAM
Definition: windef.h:207

Referenced by MCIWndProc().

◆ MCIWND_notify_media()

static void MCIWND_notify_media ( MCIWndInfo mwi)
static

Definition at line 371 of file mciwnd.c.

372{
374 {
375 if (!mwi->lpName)
376 {
377 static const WCHAR empty_str[1];
379 }
380 else
381 {
382 if (mwi->dwStyle & MCIWNDF_NOTIFYANSI)
383 {
384 char *ansi_name;
385 int len;
386
387 len = WideCharToMultiByte(CP_ACP, 0, mwi->lpName, -1, NULL, 0, NULL, NULL);
388 ansi_name = HeapAlloc(GetProcessHeap(), 0, len);
389 WideCharToMultiByte(CP_ACP, 0, mwi->lpName, -1, ansi_name, len, NULL, NULL);
390
392
393 HeapFree(GetProcessHeap(), 0, ansi_name);
394 }
395 else
397 }
398 }
399}
static const TCHAR empty_str[]
Definition: dialog.c:20
#define CP_ACP
Definition: compat.h:109
#define HeapFree(x, y, z)
Definition: compat.h:735
#define WideCharToMultiByte
Definition: compat.h:111
GLenum GLsizei len
Definition: glext.h:6722
LPWSTR lpName
Definition: mciwnd.c:53
#define MCIWNDF_NOTIFYMEDIAA
Definition: vfw.h:1802
#define MCIWNDM_NOTIFYMEDIA
Definition: vfw.h:1996
#define MCIWNDF_NOTIFYMEDIAW
Definition: vfw.h:1803
#define MCIWNDF_NOTIFYANSI
Definition: vfw.h:1800

Referenced by MCIWndProc().

◆ MCIWND_notify_mode()

static void MCIWND_notify_mode ( MCIWndInfo mwi)
inlinestatic

Definition at line 143 of file mciwnd.c.

144{
145 if (mwi->dwStyle & MCIWNDF_NOTIFYMODE)
146 {
147 UINT new_mode = SendMessageW(mwi->hWnd, MCIWNDM_GETMODEW, 0, 0);
148 if (new_mode != mwi->mode)
149 {
150 mwi->mode = new_mode;
151 SendMessageW(mwi->hwndOwner, MCIWNDM_NOTIFYMODE, (WPARAM)mwi->hWnd, new_mode);
152 }
153 }
154}
unsigned int UINT
Definition: ndis.h:50
#define MCIWNDF_NOTIFYMODE
Definition: vfw.h:1794
#define MCIWNDM_GETMODEW
Definition: vfw.h:1971
#define MCIWNDM_NOTIFYMODE
Definition: vfw.h:1993

Referenced by mci_generic_command(), and MCIWndProc().

◆ MCIWND_notify_pos()

static void MCIWND_notify_pos ( MCIWndInfo mwi)
inlinestatic

Definition at line 156 of file mciwnd.c.

157{
158 if (mwi->dwStyle & MCIWNDF_NOTIFYPOS)
159 {
160 LONG new_pos = SendMessageW(mwi->hWnd, MCIWNDM_GETPOSITIONW, 0, 0);
161 if (new_pos != mwi->position)
162 {
163 mwi->position = new_pos;
164 SendMessageW(mwi->hwndOwner, MCIWNDM_NOTIFYPOS, (WPARAM)mwi->hWnd, new_pos);
165 }
166 }
167}
long LONG
Definition: pedump.c:60
#define MCIWNDM_GETPOSITIONW
Definition: vfw.h:1970
#define MCIWNDM_NOTIFYPOS
Definition: vfw.h:1994
#define MCIWNDF_NOTIFYPOS
Definition: vfw.h:1795

Referenced by MCIWND_UpdateState().

◆ MCIWND_notify_size()

static void MCIWND_notify_size ( MCIWndInfo mwi)
inlinestatic

Definition at line 169 of file mciwnd.c.

170{
171 if (mwi->dwStyle & MCIWNDF_NOTIFYSIZE)
173}
#define MCIWNDM_NOTIFYSIZE
Definition: vfw.h:1995
#define MCIWNDF_NOTIFYSIZE
Definition: vfw.h:1796

Referenced by MCIWndProc().

◆ MCIWND_ToggleState()

static void MCIWND_ToggleState ( MCIWndInfo mwi)
static

Definition at line 333 of file mciwnd.c.

334{
335 switch (SendMessageW(mwi->hWnd, MCIWNDM_GETMODEW, 0, 0))
336 {
338 case MCI_MODE_RECORD:
339 case MCI_MODE_SEEK:
340 case MCI_MODE_OPEN:
341 TRACE("Cannot do much...\n");
342 break;
343
344 case MCI_MODE_PAUSE:
345 SendMessageW(mwi->hWnd, MCI_RESUME, 0, 0);
346 break;
347
348 case MCI_MODE_PLAY:
349 SendMessageW(mwi->hWnd, MCI_PAUSE, 0, 0);
350 break;
351
352 case MCI_MODE_STOP:
353 SendMessageW(mwi->hWnd, MCI_STOP, 0, 0);
354 break;
355 }
356}
#define MCI_RESUME
Definition: mmsystem.h:675
#define MCI_MODE_PLAY
Definition: mmsystem.h:696
#define MCI_MODE_OPEN
Definition: mmsystem.h:700
#define MCI_MODE_RECORD
Definition: mmsystem.h:697
#define MCI_MODE_SEEK
Definition: mmsystem.h:698
#define MCI_MODE_STOP
Definition: mmsystem.h:695
#define MCI_PAUSE
Definition: mmsystem.h:652
#define MCI_MODE_PAUSE
Definition: mmsystem.h:699

Referenced by MCIWND_Command().

◆ MCIWND_UpdateState()

static void MCIWND_UpdateState ( MCIWndInfo mwi)
static

Definition at line 181 of file mciwnd.c.

182{
183 WCHAR buffer[1024];
184
185 if (!mwi->mci)
186 {
187 /* FIXME: get this from resources */
188 static const WCHAR no_deviceW[] = {'N','o',' ','D','e','v','i','c','e',0};
189 SetWindowTextW(mwi->hWnd, no_deviceW);
190 return;
191 }
192
194
195 if (!(mwi->dwStyle & MCIWNDF_NOPLAYBAR))
197
198 if (!(mwi->dwStyle & MCIWNDF_SHOWALL))
199 return;
200
201 if ((mwi->dwStyle & MCIWNDF_SHOWNAME) && mwi->lpName)
202 lstrcpyW(buffer, mwi->lpName);
203 else
204 *buffer = 0;
205
207 {
208 static const WCHAR spaceW[] = {' ',0};
209 static const WCHAR l_braceW[] = {'(',0};
210
212 lstrcatW(buffer, l_braceW);
213 }
214
215 if (mwi->dwStyle & MCIWNDF_SHOWPOS)
216 {
217 WCHAR posW[64];
218
219 posW[0] = 0;
221 lstrcatW(buffer, posW);
222 }
223
225 {
226 static const WCHAR dashW[] = {' ','-',' ',0};
227 lstrcatW(buffer, dashW);
228 }
229
230 if (mwi->dwStyle & MCIWNDF_SHOWMODE)
231 {
232 WCHAR modeW[64];
233
234 modeW[0] = 0;
235 SendMessageW(mwi->hWnd, MCIWNDM_GETMODEW, 64, (LPARAM)modeW);
236 lstrcatW(buffer, modeW);
237 }
238
240 {
241 static const WCHAR r_braceW[] = {')',0};
242 lstrcatW(buffer, r_braceW);
243 }
244
245 TRACE("=> %s\n", debugstr_w(buffer));
247}
#define TRUE
Definition: types.h:120
#define lstrcpyW
Definition: compat.h:749
static void MCIWND_notify_pos(MCIWndInfo *mwi)
Definition: mciwnd.c:156
GLuint buffer
Definition: glext.h:5915
#define debugstr_w
Definition: kernel32.h:32
LPWSTR WINAPI lstrcatW(LPWSTR lpString1, LPCWSTR lpString2)
Definition: lstring.c:274
static const WCHAR spaceW[]
Definition: mxwriter.c:44
#define TBM_SETPOS
Definition: commctrl.h:2036
#define MCIWNDF_SHOWMODE
Definition: vfw.h:1791
#define MCIWNDF_SHOWPOS
Definition: vfw.h:1790
#define MCIWNDF_SHOWNAME
Definition: vfw.h:1789
#define MCIWNDF_SHOWALL
Definition: vfw.h:1792
LRESULT WINAPI SendDlgItemMessageW(_In_ HWND, _In_ int, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
BOOL WINAPI SetWindowTextW(_In_ HWND, _In_opt_ LPCWSTR)

Referenced by mci_generic_command(), and MCIWndProc().

◆ MCIWndCreateA()

HWND VFWAPIV MCIWndCreateA ( HWND  hwndParent,
HINSTANCE  hInstance,
DWORD  dwStyle,
LPCSTR  szFile 
)

Definition at line 126 of file mciwnd.c.

128{
129 HWND ret;
131
132 if (szFile)
134 else
135 fileW.Buffer = NULL;
136
137 ret = MCIWndCreateW(hwndParent, hInstance, dwStyle, fileW.Buffer);
138
140 return ret;
141}
HINSTANCE hInstance
Definition: charmap.c:19
static HWND hwndParent
Definition: cryptui.c:300
HWND VFWAPIV MCIWndCreateW(HWND hwndParent, HINSTANCE hInstance, DWORD dwStyle, LPCWSTR szFile)
Definition: mciwnd.c:102
static const WCHAR fileW[]
Definition: url.c:111
NTSYSAPI BOOLEAN NTAPI RtlCreateUnicodeStringFromAsciiz(_Out_ PUNICODE_STRING Destination, _In_ PCSZ Source)
NTSYSAPI VOID NTAPI RtlFreeUnicodeString(PUNICODE_STRING UnicodeString)
int ret

Referenced by test_MCIWndCreate().

◆ MCIWndCreateW()

HWND VFWAPIV MCIWndCreateW ( HWND  hwndParent,
HINSTANCE  hInstance,
DWORD  dwStyle,
LPCWSTR  szFile 
)

Definition at line 102 of file mciwnd.c.

104{
105 TRACE("%p %p %x %s\n", hwndParent, hInstance, dwStyle, debugstr_w(szFile));
106
108
110
111 if (hwndParent)
112 dwStyle |= WS_VISIBLE | WS_BORDER /*| WS_CHILD*/;
113 else
115
118 0, 0, 300, 0,
119 hwndParent, 0, hInstance, (LPVOID)szFile);
120}
HMODULE WINAPI GetModuleHandleW(LPCWSTR lpModuleName)
Definition: loader.c:838
BOOL VFWAPIV MCIWndRegisterClass(void)
Definition: mciwnd.c:72
#define WS_MAXIMIZEBOX
Definition: pedump.c:632
#define WS_SYSMENU
Definition: pedump.c:629
#define WS_BORDER
Definition: pedump.c:625
#define WS_CLIPSIBLINGS
Definition: pedump.c:618
#define WS_CLIPCHILDREN
Definition: pedump.c:619
#define WS_MINIMIZEBOX
Definition: pedump.c:631
#define WS_THICKFRAME
Definition: pedump.c:630

Referenced by MCIWndCreateA().

◆ MCIWndProc()

static LRESULT WINAPI MCIWndProc ( HWND  hWnd,
UINT  wMsg,
WPARAM  wParam,
LPARAM  lParam 
)
static

Definition at line 445 of file mciwnd.c.

446{
447 MCIWndInfo *mwi;
448
449 TRACE("%p %04x %08lx %08lx\n", hWnd, wMsg, wParam, lParam);
450
452 if (!mwi && wMsg != WM_CREATE)
453 return DefWindowProcW(hWnd, wMsg, wParam, lParam);
454
455 switch (wMsg)
456 {
457 case WM_CREATE:
459 break;
460
461 case WM_DESTROY:
462 if (mwi->uTimer)
463 KillTimer(hWnd, mwi->uTimer);
464
465 if (mwi->mci)
467
468 HeapFree(GetProcessHeap(), 0, mwi);
469
473 break;
474
475 case WM_PAINT:
476 {
477 MCI_DGV_UPDATE_PARMS mci_update;
478 PAINTSTRUCT ps;
479
480 mci_update.hDC = (wParam) ? (HDC)wParam : BeginPaint(hWnd, &ps);
481
484 (DWORD_PTR)&mci_update);
485
486 if (!wParam) EndPaint(hWnd, &ps);
487 return 1;
488 }
489
490 case WM_COMMAND:
491 return MCIWND_Command(mwi, wParam, lParam);
492
493 case WM_KEYDOWN:
494 return MCIWND_KeyDown(mwi, wParam);
495
496 case WM_NCACTIVATE:
497 if (mwi->uTimer)
498 {
499 KillTimer(hWnd, mwi->uTimer);
500 mwi->uTimer = SetTimer(hWnd, 1, wParam ? mwi->active_timer : mwi->inactive_timer, NULL);
501 }
502 break;
503
504 case WM_TIMER:
506 return 0;
507
508 case WM_SIZE:
512
513 if (!(mwi->dwStyle & MCIWNDF_NOAUTOSIZEMOVIE))
514 {
515 RECT rc;
516
517 rc.left = rc.top = 0;
518 rc.right = LOWORD(lParam);
519 rc.bottom = HIWORD(lParam);
520 if (!(mwi->dwStyle & MCIWNDF_NOPLAYBAR))
521 rc.bottom -= 32; /* subtract the height of the playbar */
523 }
525 break;
526
527 case MM_MCINOTIFY:
530 return 0;
531
532 case MCIWNDM_OPENA:
533 {
535 TRACE("MCIWNDM_OPENA %s\n", debugstr_a((LPSTR)lParam));
537 lParam = (LPARAM)nameW.Buffer;
538 }
539 /* fall through */
540 case MCIWNDM_OPENW:
541 {
542 RECT rc;
543 HCURSOR hCursor;
544 MCI_OPEN_PARMSW mci_open;
545 MCI_GETDEVCAPS_PARMS mci_devcaps;
546 WCHAR aliasW[64];
547 WCHAR drv_name[MAX_PATH];
548 static const WCHAR formatW[] = {'%','d',0};
549 static const WCHAR mci32W[] = {'m','c','i','3','2',0};
550 static const WCHAR system_iniW[] = {'s','y','s','t','e','m','.','i','n','i',0};
551
552 TRACE("MCIWNDM_OPENW %s\n", debugstr_w((LPWSTR)lParam));
553
554 if (wParam == MCIWNDOPENF_NEW)
555 {
557 goto end_of_mci_open;
558 }
559
560 if (mwi->uTimer)
561 {
562 KillTimer(hWnd, mwi->uTimer);
563 mwi->uTimer = 0;
564 }
565
566 hCursor = LoadCursorW(0, (LPWSTR)IDC_WAIT);
567 hCursor = SetCursor(hCursor);
568
569 mci_open.lpstrElementName = (LPWSTR)lParam;
570 wsprintfW(aliasW, formatW, HandleToLong(hWnd) + 1);
571 mci_open.lpstrAlias = aliasW;
574 (DWORD_PTR)&mci_open);
575 SetCursor(hCursor);
576
577 if (mwi->lasterror && !(mwi->dwStyle & MCIWNDF_NOERRORDLG))
578 {
579 /* FIXME: get the caption from resources */
580 static const WCHAR caption[] = {'M','C','I',' ','E','r','r','o','r',0};
581 WCHAR error_str[MAXERRORLENGTH];
582
584 MessageBoxW(hWnd, error_str, caption, MB_ICONEXCLAMATION | MB_OK);
586 goto end_of_mci_open;
587 }
588
589 mwi->mci = mci_open.wDeviceID;
590 mwi->alias = HandleToLong(hWnd) + 1;
591
592 mwi->lpName = HeapAlloc(GetProcessHeap(), 0, (lstrlenW((LPWSTR)lParam) + 1) * sizeof(WCHAR));
594
596
600 (DWORD_PTR)&mci_devcaps);
601 if (mwi->lasterror)
602 {
604 goto end_of_mci_open;
605 }
606
607 mwi->dev_type = mci_devcaps.dwReturn;
608
609 drv_name[0] = 0;
610 SendMessageW(hWnd, MCIWNDM_GETDEVICEW, 256, (LPARAM)drv_name);
611 if (drv_name[0] && GetPrivateProfileStringW(mci32W, drv_name, NULL,
612 drv_name, MAX_PATH, system_iniW))
613 mwi->hdrv = OpenDriver(drv_name, NULL, 0);
614
616 {
617 MCI_DGV_WINDOW_PARMSW mci_window;
618
619 mci_window.hWnd = hWnd;
622 (DWORD_PTR)&mci_window);
623 if (mwi->lasterror)
624 {
626 goto end_of_mci_open;
627 }
628 }
629
630 if (SendMessageW(hWnd, MCIWNDM_GET_DEST, 0, (LPARAM)&rc) == 0)
631 {
632 mwi->size.cx = rc.right - rc.left;
633 mwi->size.cy = rc.bottom - rc.top;
634
635 rc.right = MulDiv(mwi->size.cx, mwi->zoom, 100);
636 rc.bottom = MulDiv(mwi->size.cy, mwi->zoom, 100);
638 }
639 else
640 {
641 GetClientRect(hWnd, &rc);
642 rc.bottom = rc.top;
643 }
644
645 if (!(mwi->dwStyle & MCIWNDF_NOPLAYBAR))
646 rc.bottom += 32; /* add the height of the playbar */
648 SetWindowPos(hWnd, 0, 0, 0, rc.right - rc.left,
649 rc.bottom - rc.top, SWP_NOMOVE | SWP_NOZORDER | SWP_NOACTIVATE);
650
654 mwi->uTimer = SetTimer(hWnd, 1, mwi->active_timer, NULL);
655
657
658end_of_mci_open:
659 if (wMsg == MCIWNDM_OPENA)
660 HeapFree(GetProcessHeap(), 0, (void *)lParam);
661 return mwi->lasterror;
662 }
663
665 TRACE("MCIWNDM_GETDEVICEID\n");
666 return mwi->mci;
667
668 case MCIWNDM_GETALIAS:
669 TRACE("MCIWNDM_GETALIAS\n");
670 return mwi->alias;
671
673 {
674 MCI_DGV_RECT_PARMS mci_rect;
675
678 (DWORD_PTR)&mci_rect);
679 if (mwi->lasterror)
680 {
682 return mwi->lasterror;
683 }
684 *(RECT *)lParam = mci_rect.rc;
685 TRACE("MCIWNDM_GET_SOURCE: %s\n", wine_dbgstr_rect(&mci_rect.rc));
686 return 0;
687 }
688
689 case MCIWNDM_GET_DEST:
690 {
691 MCI_DGV_RECT_PARMS mci_rect;
692
695 (DWORD_PTR)&mci_rect);
696 if (mwi->lasterror)
697 {
699 return mwi->lasterror;
700 }
701 *(RECT *)lParam = mci_rect.rc;
702 TRACE("MCIWNDM_GET_DEST: %s\n", wine_dbgstr_rect(&mci_rect.rc));
703 return 0;
704 }
705
707 {
708 MCI_DGV_PUT_PARMS mci_put;
709
710 mci_put.rc = *(RECT *)lParam;
711 TRACE("MCIWNDM_PUT_SOURCE: %s\n", wine_dbgstr_rect(&mci_put.rc));
714 (DWORD_PTR)&mci_put);
715 if (mwi->lasterror)
716 {
718 return mwi->lasterror;
719 }
720 return 0;
721 }
722
723 case MCIWNDM_PUT_DEST:
724 {
725 MCI_DGV_PUT_PARMS mci_put;
726
727 mci_put.rc = *(RECT *)lParam;
728 TRACE("MCIWNDM_PUT_DEST: %s\n", wine_dbgstr_rect(&mci_put.rc));
729
732 (DWORD_PTR)&mci_put);
733 if (mwi->lasterror)
734 {
736 return mwi->lasterror;
737 }
738 return 0;
739 }
740
742 {
743 MCI_STATUS_PARMS mci_status;
744
745 mci_status.dwItem = MCI_STATUS_LENGTH;
748 (DWORD_PTR)&mci_status);
749 if (mwi->lasterror)
750 {
752 return 0;
753 }
754 TRACE("MCIWNDM_GETLENGTH: %ld\n", mci_status.dwReturn);
755 return mci_status.dwReturn;
756 }
757
758 case MCIWNDM_GETSTART:
759 {
760 MCI_STATUS_PARMS mci_status;
761
762 mci_status.dwItem = MCI_STATUS_POSITION;
765 (DWORD_PTR)&mci_status);
766 if (mwi->lasterror)
767 {
769 return 0;
770 }
771 TRACE("MCIWNDM_GETSTART: %ld\n", mci_status.dwReturn);
772 return mci_status.dwReturn;
773 }
774
775 case MCIWNDM_GETEND:
776 {
778
781 TRACE("MCIWNDM_GETEND: %ld\n", start + length);
782 return (start + length);
783 }
784
787 {
788 MCI_STATUS_PARMS mci_status;
789
790 TRACE("MCIWNDM_GETPOSITION\n");
791
792 /* get position string if requested */
793 if (wParam && lParam)
794 {
795 if (wMsg == MCIWNDM_GETPOSITIONA)
796 {
797 char cmd[64];
798
799 wsprintfA(cmd, "status %d position", mwi->alias);
801 }
802 else
803 {
804
805 WCHAR cmdW[64];
806 static const WCHAR formatW[] = {'s','t','a','t','u','s',' ','%','d',' ','p','o','s','i','t','i','o','n',0};
807
808 wsprintfW(cmdW, formatW, mwi->alias);
809 mwi->lasterror = mciSendStringW(cmdW, (LPWSTR)lParam, wParam, 0);
810 }
811
812 if (mwi->lasterror)
813 return 0;
814 }
815
816 mci_status.dwItem = MCI_STATUS_POSITION;
819 (DWORD_PTR)&mci_status);
820 if (mwi->lasterror)
821 return 0;
822
823 return mci_status.dwReturn;
824 }
825
826 case MCIWNDM_GETMODEA:
827 case MCIWNDM_GETMODEW:
828 {
829 MCI_STATUS_PARMS mci_status;
830
831 TRACE("MCIWNDM_GETMODE\n");
832
833 if (!mwi->mci)
834 return MCI_MODE_NOT_READY;
835
836 /* get mode string if requested */
837 if (wParam && lParam)
838 {
839 if (wMsg == MCIWNDM_GETMODEA)
840 {
841 char cmd[64];
842
843 wsprintfA(cmd, "status %d mode", mwi->alias);
845 }
846 else
847 {
848
849 WCHAR cmdW[64];
850 static const WCHAR formatW[] = {'s','t','a','t','u','s',' ','%','d',' ','m','o','d','e',0};
851
852 wsprintfW(cmdW, formatW, mwi->alias);
853 mwi->lasterror = mciSendStringW(cmdW, (LPWSTR)lParam, wParam, 0);
854 }
855
856 if (mwi->lasterror)
857 return MCI_MODE_NOT_READY;
858 }
859
860 mci_status.dwItem = MCI_STATUS_MODE;
863 (DWORD_PTR)&mci_status);
864 if (mwi->lasterror)
865 return MCI_MODE_NOT_READY;
866
867 return mci_status.dwReturn;
868 }
869
870 case MCIWNDM_PLAYFROM:
871 {
872 MCI_PLAY_PARMS mci_play;
873
874 TRACE("MCIWNDM_PLAYFROM %08lx\n", lParam);
875
876 mci_play.dwCallback = (DWORD_PTR)hWnd;
877 mci_play.dwFrom = lParam;
880 (DWORD_PTR)&mci_play);
881 if (mwi->lasterror)
882 {
884 return mwi->lasterror;
885 }
886
889 return 0;
890 }
891
892 case MCIWNDM_PLAYTO:
893 {
894 MCI_PLAY_PARMS mci_play;
895
896 TRACE("MCIWNDM_PLAYTO %08lx\n", lParam);
897
898 mci_play.dwCallback = (DWORD_PTR)hWnd;
899 mci_play.dwTo = lParam;
902 (DWORD_PTR)&mci_play);
903 if (mwi->lasterror)
904 {
906 return mwi->lasterror;
907 }
908
911 return 0;
912 }
913
915 {
916 MCI_PLAY_PARMS mci_play;
918
919 TRACE("MCIWNDM_PLAYREVERSE %08lx\n", lParam);
920
921 mci_play.dwCallback = (DWORD_PTR)hWnd;
922 mci_play.dwFrom = lParam;
923 switch (mwi->dev_type)
924 {
925 default:
928 break;
929
932 break;
933
934#ifdef MCI_VCR_PLAY_REVERSE
935 case MCI_DEVTYPE_VCR:
936 flags |= MCI_VCR_PLAY_REVERSE;
937 break;
938#endif
939
942 break;
943
944 }
946 flags, (DWORD_PTR)&mci_play);
947 if (mwi->lasterror)
948 {
950 return mwi->lasterror;
951 }
952
955 return 0;
956 }
957
960 TRACE("MCIWNDM_GETERRORA: %s\n", debugstr_an((LPSTR)lParam, wParam));
961 return mwi->lasterror;
962
965 TRACE("MCIWNDM_GETERRORW: %s\n", debugstr_wn((LPWSTR)lParam, wParam));
966 return mwi->lasterror;
967
968 case MCIWNDM_SETOWNER:
969 TRACE("MCIWNDM_SETOWNER %p\n", (HWND)wParam);
970 mwi->hwndOwner = (HWND)wParam;
971 return 0;
972
974 {
976
977 TRACE("MCIWNDM_SENDSTRINGA %s\n", debugstr_a((LPCSTR)lParam));
978
980 lParam = (LPARAM)stringW.Buffer;
981 }
982 /* fall through */
984 {
985 WCHAR *cmdW, *p;
986
987 TRACE("MCIWNDM_SENDSTRINGW %s\n", debugstr_w((LPCWSTR)lParam));
988
989 p = wcschr((LPCWSTR)lParam, ' ');
990 if (p)
991 {
992 static const WCHAR formatW[] = {'%','d',' ',0};
993 int len, pos;
994
995 pos = p - (WCHAR *)lParam + 1;
996 len = lstrlenW((LPCWSTR)lParam) + 64;
997
998 cmdW = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR));
999
1000 memcpy(cmdW, (void *)lParam, pos * sizeof(WCHAR));
1001 wsprintfW(cmdW + pos, formatW, mwi->alias);
1002 lstrcatW(cmdW, (WCHAR *)lParam + pos);
1003 }
1004 else
1005 cmdW = (LPWSTR)lParam;
1006
1007 mwi->lasterror = mciSendStringW(cmdW, mwi->return_string,
1008 ARRAY_SIZE(mwi->return_string), 0);
1009 if (mwi->lasterror)
1011
1012 if (cmdW != (LPWSTR)lParam)
1013 HeapFree(GetProcessHeap(), 0, cmdW);
1014
1015 if (wMsg == MCIWNDM_SENDSTRINGA)
1016 HeapFree(GetProcessHeap(), 0, (void *)lParam);
1017
1018 MCIWND_UpdateState(mwi);
1019 return mwi->lasterror;
1020 }
1021
1024 TRACE("MCIWNDM_RETURNTRINGA %s\n", debugstr_an((LPSTR)lParam, wParam));
1025 return mwi->lasterror;
1026
1029 TRACE("MCIWNDM_RETURNTRINGW %s\n", debugstr_wn((LPWSTR)lParam, wParam));
1030 return mwi->lasterror;
1031
1032 case MCIWNDM_SETTIMERS:
1033 TRACE("MCIWNDM_SETTIMERS active %d ms, inactive %d ms\n", (int)wParam, (int)lParam);
1034 mwi->active_timer = (WORD)wParam;
1035 mwi->inactive_timer = (WORD)lParam;
1036 return 0;
1037
1039 TRACE("MCIWNDM_SETACTIVETIMER %d ms\n", (int)wParam);
1040 mwi->active_timer = (WORD)wParam;
1041 return 0;
1042
1044 TRACE("MCIWNDM_SETINACTIVETIMER %d ms\n", (int)wParam);
1045 mwi->inactive_timer = (WORD)wParam;
1046 return 0;
1047
1049 TRACE("MCIWNDM_GETACTIVETIMER: %d ms\n", mwi->active_timer);
1050 return mwi->active_timer;
1051
1053 TRACE("MCIWNDM_GETINACTIVETIMER: %d ms\n", mwi->inactive_timer);
1054 return mwi->inactive_timer;
1055
1057 TRACE("MCIWNDM_CHANGESTYLES mask %08lx, set %08lx\n", wParam, lParam);
1058 /* FIXME: update the visual window state as well:
1059 * add/remove trackbar, autosize, etc.
1060 */
1061 mwi->dwStyle &= ~wParam;
1062 mwi->dwStyle |= lParam & wParam;
1063 return 0;
1064
1065 case MCIWNDM_GETSTYLES:
1066 TRACE("MCIWNDM_GETSTYLES: %08x\n", mwi->dwStyle & 0xffff);
1067 return mwi->dwStyle & 0xffff;
1068
1069 case MCIWNDM_GETDEVICEA:
1070 {
1071 int len = 0;
1072 char *str = (char *)lParam;
1073 MCI_SYSINFO_PARMSA mci_sysinfo;
1074
1075 mci_sysinfo.lpstrReturn = str;
1076 mci_sysinfo.dwRetSize = wParam;
1079 (DWORD_PTR)&mci_sysinfo);
1080 while(len < wParam && str[len]) len++;
1081 TRACE("MCIWNDM_GETDEVICEA: %s\n", debugstr_an(str, len));
1082 return 0;
1083 }
1084
1085 case MCIWNDM_GETDEVICEW:
1086 {
1087 int len = 0;
1088 WCHAR *str = (WCHAR *)lParam;
1089 MCI_SYSINFO_PARMSW mci_sysinfo;
1090
1091 mci_sysinfo.lpstrReturn = str;
1092 mci_sysinfo.dwRetSize = wParam;
1095 (DWORD_PTR)&mci_sysinfo);
1096 while(len < wParam && str[len]) len++;
1097 TRACE("MCIWNDM_GETDEVICEW: %s\n", debugstr_wn(str, len));
1098 return 0;
1099 }
1100
1102 TRACE("MCIWNDM_VALIDATEMEDIA\n");
1103 if (mwi->mci)
1104 {
1107 }
1108 return 0;
1109
1111 TRACE("MCIWNDM_GETFILENAMEA: %s\n", debugstr_w(mwi->lpName));
1112 if (mwi->lpName)
1114 return 0;
1115
1117 TRACE("MCIWNDM_GETFILENAMEW: %s\n", debugstr_w(mwi->lpName));
1118 if (mwi->lpName)
1120 return 0;
1121
1124 {
1125 MCI_STATUS_PARMS mci_status;
1126
1127 TRACE("MCIWNDM_GETTIMEFORMAT %08lx %08lx\n", wParam, lParam);
1128
1129 /* get format string if requested */
1130 if (wParam && lParam)
1131 {
1132 if (wMsg == MCIWNDM_GETTIMEFORMATA)
1133 {
1134 char cmd[64];
1135
1136 wsprintfA(cmd, "status %d time format", mwi->alias);
1138 if (mwi->lasterror)
1139 return 0;
1140 }
1141 else
1142 {
1143 WCHAR cmdW[64];
1144 static const WCHAR formatW[] = {'s','t','a','t','u','s',' ','%','d',' ','t','i','m','e',' ','f','o','r','m','a','t',0};
1145
1146 wsprintfW(cmdW, formatW, mwi->alias);
1147 mwi->lasterror = mciSendStringW(cmdW, (LPWSTR)lParam, wParam, 0);
1148 if (mwi->lasterror)
1149 return 0;
1150 }
1151 }
1152
1153 mci_status.dwItem = MCI_STATUS_TIME_FORMAT ;
1156 (DWORD_PTR)&mci_status);
1157 if (mwi->lasterror)
1158 return 0;
1159
1160 return mci_status.dwReturn;
1161 }
1162
1164 {
1166
1167 TRACE("MCIWNDM_SETTIMEFORMATA %s\n", debugstr_a((LPSTR)lParam));
1168
1170 lParam = (LPARAM)stringW.Buffer;
1171 }
1172 /* fall through */
1174 {
1175 static const WCHAR formatW[] = {'s','e','t',' ','%','d',' ','t','i','m','e',' ','f','o','r','m','a','t',' ',0};
1176 WCHAR *cmdW;
1177
1178 TRACE("MCIWNDM_SETTIMEFORMATW %s\n", debugstr_w((LPWSTR)lParam));
1179
1180 if (mwi->mci)
1181 {
1182 cmdW = HeapAlloc(GetProcessHeap(), 0, (lstrlenW((LPCWSTR)lParam) + 64) * sizeof(WCHAR));
1183 wsprintfW(cmdW, formatW, mwi->alias);
1184 lstrcatW(cmdW, (WCHAR *)lParam);
1185
1186 mwi->lasterror = mciSendStringW(cmdW, NULL, 0, 0);
1187
1188 /* fix the range tracking according to the new time format */
1189 if (!mwi->lasterror)
1192
1193 HeapFree(GetProcessHeap(), 0, cmdW);
1194 }
1195
1196 if (wMsg == MCIWNDM_SETTIMEFORMATA)
1197 HeapFree(GetProcessHeap(), 0, (void *)lParam);
1198
1199 return 0;
1200 }
1201
1202 case MCIWNDM_CAN_PLAY:
1203 TRACE("MCIWNDM_CAN_PLAY\n");
1204 if (mwi->mci)
1206 return 0;
1207
1208 case MCIWNDM_CAN_RECORD:
1209 TRACE("MCIWNDM_CAN_RECORD\n");
1210 if (mwi->mci)
1212 return 0;
1213
1214 case MCIWNDM_CAN_SAVE:
1215 TRACE("MCIWNDM_CAN_SAVE\n");
1216 if (mwi->mci)
1218 return 0;
1219
1220 case MCIWNDM_CAN_EJECT:
1221 TRACE("MCIWNDM_CAN_EJECT\n");
1222 if (mwi->mci)
1224 return 0;
1225
1226 case MCIWNDM_CAN_WINDOW:
1227 TRACE("MCIWNDM_CAN_WINDOW\n");
1228 switch (mwi->dev_type)
1229 {
1233 return 1;
1234 }
1235 return 0;
1236
1237 case MCIWNDM_CAN_CONFIG:
1238 TRACE("MCIWNDM_CAN_CONFIG\n");
1239 if (mwi->hdrv)
1240 return SendDriverMessage(mwi->hdrv, DRV_QUERYCONFIGURE, 0, 0);
1241 return 0;
1242
1243 case MCIWNDM_SETZOOM:
1244 TRACE("MCIWNDM_SETZOOM %ld\n", lParam);
1245 mwi->zoom = lParam;
1246
1247 if (mwi->mci && !(mwi->dwStyle & MCIWNDF_NOAUTOSIZEWINDOW))
1248 {
1249 RECT rc;
1250
1251 rc.left = rc.top = 0;
1252 rc.right = MulDiv(mwi->size.cx, mwi->zoom, 100);
1253 rc.bottom = MulDiv(mwi->size.cy, mwi->zoom, 100);
1254
1255 if (!(mwi->dwStyle & MCIWNDF_NOPLAYBAR))
1256 rc.bottom += 32; /* add the height of the playbar */
1258 SetWindowPos(hWnd, 0, 0, 0, rc.right - rc.left, rc.bottom - rc.top,
1260 }
1261 return 0;
1262
1263 case MCIWNDM_GETZOOM:
1264 TRACE("MCIWNDM_GETZOOM: %d\n", mwi->zoom);
1265 return mwi->zoom;
1266
1267 case MCIWNDM_EJECT:
1268 {
1269 MCI_SET_PARMS mci_set;
1270
1271 TRACE("MCIWNDM_EJECT\n");
1272
1273 mci_set.dwCallback = (DWORD_PTR)hWnd;
1274 mwi->lasterror = mciSendCommandW(mwi->mci, MCI_SET,
1276 (DWORD_PTR)&mci_set);
1277 MCIWND_notify_mode(mwi);
1278 MCIWND_UpdateState(mwi);
1279 return mwi->lasterror;
1280 }
1281
1282 case MCIWNDM_SETVOLUME:
1283 case MCIWNDM_GETVOLUME:
1284 case MCIWNDM_SETSPEED:
1285 case MCIWNDM_GETSPEED:
1286 case MCIWNDM_SETREPEAT:
1287 case MCIWNDM_GETREPEAT:
1288 case MCIWNDM_REALIZE:
1289 case MCIWNDM_GETPALETTE:
1290 case MCIWNDM_SETPALETTE:
1291 case MCIWNDM_NEWA:
1292 case MCIWNDM_NEWW:
1295 FIXME("support for MCIWNDM_ message WM_USER+%d not implemented\n", wMsg - WM_USER);
1296 return 0;
1297
1298 case MCI_PLAY:
1299 {
1301 return SendMessageW(hWnd, MCIWNDM_PLAYTO, 0, end);
1302 }
1303
1304 case MCI_SEEK:
1305 case MCI_STEP:
1306 {
1307 MCI_SEEK_PARMS mci_seek; /* Layout is usable as MCI_XYZ_STEP_PARMS */
1308 DWORD flags = MCI_STEP == wMsg ? 0 :
1311
1312 mci_seek.dwTo = lParam;
1313 mwi->lasterror = mciSendCommandW(mwi->mci, wMsg,
1314 flags, (DWORD_PTR)&mci_seek);
1315 if (mwi->lasterror)
1316 {
1318 return mwi->lasterror;
1319 }
1320 /* update window to reflect the state */
1321 else InvalidateRect(hWnd, NULL, TRUE);
1322 return 0;
1323 }
1324
1325 case MCI_CLOSE:
1326 {
1327 RECT rc;
1328 MCI_GENERIC_PARMS mci_generic;
1329
1330 if (mwi->hdrv)
1331 {
1332 CloseDriver(mwi->hdrv, 0, 0);
1333 mwi->hdrv = 0;
1334 }
1335
1336 if (mwi->mci)
1337 {
1338 mci_generic.dwCallback = 0;
1340 0, (DWORD_PTR)&mci_generic);
1341 mwi->mci = 0;
1342 }
1343
1344 mwi->mode = MCI_MODE_NOT_READY;
1345 mwi->position = -1;
1346
1347 HeapFree(GetProcessHeap(), 0, mwi->lpName);
1348 mwi->lpName = NULL;
1349 MCIWND_UpdateState(mwi);
1350
1351 GetClientRect(hWnd, &rc);
1352 rc.bottom = rc.top;
1353 if (!(mwi->dwStyle & MCIWNDF_NOPLAYBAR))
1354 rc.bottom += 32; /* add the height of the playbar */
1356 SetWindowPos(hWnd, 0, 0, 0, rc.right - rc.left,
1358
1360 return 0;
1361 }
1362
1363 case MCI_PAUSE:
1364 case MCI_STOP:
1365 case MCI_RESUME:
1366 mci_generic_command(mwi, wMsg);
1367 return mwi->lasterror;
1368
1369 case MCI_CONFIGURE:
1370 if (mwi->hdrv)
1372 return 0;
1373
1374 case MCI_BREAK:
1375 case MCI_CAPTURE:
1376 case MCI_COPY:
1377 case MCI_CUE:
1378 case MCI_CUT:
1379 case MCI_DELETE:
1380 case MCI_ESCAPE:
1381 case MCI_FREEZE:
1382 case MCI_GETDEVCAPS:
1383 /*case MCI_INDEX:*/
1384 case MCI_INFO:
1385 case MCI_LIST:
1386 case MCI_LOAD:
1387 /*case MCI_MARK:*/
1388 case MCI_MONITOR:
1389 case MCI_OPEN:
1390 case MCI_PASTE:
1391 case MCI_PUT:
1392 case MCI_QUALITY:
1393 case MCI_REALIZE:
1394 case MCI_RECORD:
1395 case MCI_RESERVE:
1396 case MCI_RESTORE:
1397 case MCI_SAVE:
1398 case MCI_SET:
1399 case MCI_SETAUDIO:
1400 /*case MCI_SETTIMECODE:*/
1401 /*case MCI_SETTUNER:*/
1402 case MCI_SETVIDEO:
1403 case MCI_SIGNAL:
1404 case MCI_SPIN:
1405 case MCI_STATUS:
1406 case MCI_SYSINFO:
1407 case MCI_UNDO:
1408 case MCI_UNFREEZE:
1409 case MCI_UPDATE:
1410 case MCI_WHERE:
1411 case MCI_WINDOW:
1412 FIXME("support for MCI_ command %04x not implemented\n", wMsg);
1413 return 0;
1414 }
1415
1416 if (wMsg >= WM_USER)
1417 {
1418 FIXME("support for MCIWNDM_ message WM_USER+%d not implemented\n", wMsg - WM_USER);
1419 return 0;
1420 }
1421
1423 return DefMDIChildProcW(hWnd, wMsg, wParam, lParam);
1424
1425 return DefWindowProcW(hWnd, wMsg, wParam, lParam);
1426}
static const char * wine_dbgstr_rect(const RECT *prc)
Definition: atltest.h:160
static const WCHAR nameW[]
Definition: main.c:49
#define ARRAY_SIZE(A)
Definition: main.h:33
#define HandleToLong(h)
Definition: basetsd.h:80
#define MCI_SETAUDIO
Definition: digitalv.h:39
#define MCI_DGV_PUT_DESTINATION
Definition: digitalv.h:234
#define MCI_MONITOR
Definition: digitalv.h:37
#define MCI_DGV_PUT_SOURCE
Definition: digitalv.h:233
#define MCI_LIST
Definition: digitalv.h:43
#define MCI_CAPTURE
Definition: digitalv.h:36
#define MCI_RESERVE
Definition: digitalv.h:38
#define MCI_SETVIDEO
Definition: digitalv.h:41
#define MCI_SIGNAL
Definition: digitalv.h:40
#define MCI_DGV_UPDATE_HDC
Definition: digitalv.h:439
#define MCI_DGV_UPDATE_PAINT
Definition: digitalv.h:440
#define MCI_DGV_WINDOW_HWND
Definition: digitalv.h:453
#define MCI_DGV_WHERE_SOURCE
Definition: digitalv.h:444
#define MCI_DGV_RECT
Definition: digitalv.h:232
#define MCI_QUALITY
Definition: digitalv.h:42
#define MCI_RESTORE
Definition: digitalv.h:46
#define MCI_CONFIGURE
Definition: digitalv.h:45
#define MCI_UNDO
Definition: digitalv.h:44
#define MCI_DGV_PLAY_REVERSE
Definition: digitalv.h:228
#define MCI_DGV_WHERE_DESTINATION
Definition: digitalv.h:445
#define FALSE
Definition: types.h:117
#define wcschr
Definition: compat.h:17
HANDLE HWND
Definition: compat.h:19
static __inline const char * debugstr_an(const char *s, int n)
Definition: compat.h:55
#define MAX_PATH
Definition: compat.h:34
#define lstrcpynW
Definition: compat.h:738
#define lstrlenW
Definition: compat.h:750
INT WINAPI GetPrivateProfileStringW(LPCWSTR section, LPCWSTR entry, LPCWSTR def_val, LPWSTR buffer, UINT len, LPCWSTR filename)
Definition: profile.c:1142
static LRESULT mci_get_devcaps(MCIWndInfo *mwi, UINT cap)
Definition: mciwnd.c:416
static void MCIWND_notify_size(MCIWndInfo *mwi)
Definition: mciwnd.c:169
static void MCIWND_notify_error(MCIWndInfo *mwi)
Definition: mciwnd.c:175
static LRESULT MCIWND_Create(HWND hWnd, LPCREATESTRUCTW cs)
Definition: mciwnd.c:249
static LRESULT MCIWND_Command(MCIWndInfo *mwi, WPARAM wParam, LPARAM lParam)
Definition: mciwnd.c:358
static LRESULT MCIWND_KeyDown(MCIWndInfo *mwi, UINT key)
Definition: mciwnd.c:430
static void MCIWND_notify_media(MCIWndInfo *mwi)
Definition: mciwnd.c:371
static MCIERROR mci_generic_command(MCIWndInfo *mwi, UINT cmd)
Definition: mciwnd.c:401
LRESULT WINAPI SendDriverMessage(HDRVR hDriver, UINT msg, LPARAM lParam1, LPARAM lParam2)
Definition: driver.c:131
HDRVR WINAPI OpenDriver(LPCWSTR lpDriverName, LPCWSTR lpSectionName, LPARAM lParam)
Definition: driver.c:400
LRESULT WINAPI CloseDriver(HDRVR hDrvr, LPARAM lParam1, LPARAM lParam2)
Definition: driver.c:462
DWORD WINAPI mciSendCommandA(MCIDEVICEID wDevID, UINT wMsg, DWORD_PTR dwParam1, DWORD_PTR dwParam2)
Definition: mci.c:2289
DWORD WINAPI mciSendStringA(LPCSTR lpstrCommand, LPSTR lpstrRet, UINT uRetLen, HWND hwndCallback)
Definition: mci.c:1586
BOOL WINAPI mciGetErrorStringA(MCIERROR dwError, LPSTR lpstrBuffer, UINT uLength)
Definition: mci.c:2206
DWORD WINAPI mciSendStringW(LPCWSTR lpstrCommand, LPWSTR lpstrRet, UINT uRetLen, HWND hwndCallback)
Definition: mci.c:1299
BOOL WINAPI mciGetErrorStringW(MCIERROR wError, LPWSTR lpstrBuffer, UINT uLength)
Definition: mci.c:2189
static const WCHAR stringW[]
Definition: engine.c:38
unsigned long DWORD
Definition: ntddk_ex.h:95
unsigned short WORD
Definition: ntddk_ex.h:93
GLuint start
Definition: gl.h:1545
GLuint GLuint end
Definition: gl.h:1545
GLbitfield flags
Definition: glext.h:7161
GLuint GLsizei GLsizei * length
Definition: glext.h:6040
GLfloat GLfloat p
Definition: glext.h:8902
#define debugstr_a
Definition: kernel32.h:31
#define debugstr_wn
Definition: kernel32.h:33
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
#define MCI_CUT
Definition: mmsystem.h:671
#define MCI_SAVE
Definition: mmsystem.h:661
#define MCI_DEVTYPE_VIDEODISC
Definition: mmsystem.h:681
#define MCI_GETDEVCAPS_CAN_SAVE
Definition: mmsystem.h:767
#define MCI_SEEK_TO_END
Definition: mmsystem.h:741
#define MCI_NOTIFY
Definition: mmsystem.h:729
#define MCI_TO
Definition: mmsystem.h:732
#define MCI_BREAK
Definition: mmsystem.h:660
#define MCI_STATUS_POSITION
Definition: mmsystem.h:745
#define DRV_QUERYCONFIGURE
Definition: mmsystem.h:126
#define MCI_GETDEVCAPS_CAN_RECORD
Definition: mmsystem.h:759
#define MCI_OPEN_ELEMENT
Definition: mmsystem.h:735
#define MCI_DELETE
Definition: mmsystem.h:676
#define MCI_FREEZE
Definition: mmsystem.h:668
#define MCI_GETDEVCAPS_DEVICE_TYPE
Definition: mmsystem.h:762
#define MCI_DEVTYPE_ANIMATION
Definition: mmsystem.h:686
#define MCI_DEVTYPE_VCR
Definition: mmsystem.h:680
#define MCI_VD_PLAY_REVERSE
Definition: mmsystem.h:794
#define MCI_WINDOW
Definition: mmsystem.h:665
#define MCI_STATUS
Definition: mmsystem.h:662
#define MCI_COPY
Definition: mmsystem.h:672
#define MCI_ESCAPE
Definition: mmsystem.h:648
#define MCI_SET
Definition: mmsystem.h:656
#define MCI_SET_DOOR_OPEN
Definition: mmsystem.h:772
#define MCI_GETDEVCAPS_CAN_PLAY
Definition: mmsystem.h:766
#define MCI_LOAD
Definition: mmsystem.h:670
#define MCI_UPDATE
Definition: mmsystem.h:674
#define MCI_SEEK
Definition: mmsystem.h:650
#define DRV_CONFIGURE
Definition: mmsystem.h:125
#define MCI_GETDEVCAPS_CAN_EJECT
Definition: mmsystem.h:765
#define MCI_WHERE
Definition: mmsystem.h:667
#define MCI_STATUS_START
Definition: mmsystem.h:743
#define MCI_OPEN
Definition: mmsystem.h:646
#define MCI_UNFREEZE
Definition: mmsystem.h:669
#define MCI_DEVTYPE_DIGITAL_VIDEO
Definition: mmsystem.h:687
#define MCI_STATUS_LENGTH
Definition: mmsystem.h:744
#define MCI_STATUS_MODE
Definition: mmsystem.h:747
#define MCI_SYSINFO_INSTALLNAME
Definition: mmsystem.h:771
#define MCI_PUT
Definition: mmsystem.h:666
#define MCI_ANIM_PLAY_REVERSE
Definition: mmsystem.h:869
#define MCI_DEVTYPE_OVERLAY
Definition: mmsystem.h:682
#define MCI_SPIN
Definition: mmsystem.h:655
#define MCI_SEEK_TO_START
Definition: mmsystem.h:740
#define MCI_WAIT
Definition: mmsystem.h:730
#define MCI_CUE
Definition: mmsystem.h:663
#define MCI_SYSINFO
Definition: mmsystem.h:659
#define MCI_FROM
Definition: mmsystem.h:731
#define MCI_INFO
Definition: mmsystem.h:653
#define MM_MCINOTIFY
Definition: mmsystem.h:55
#define MCI_PASTE
Definition: mmsystem.h:673
#define MCI_PLAY
Definition: mmsystem.h:649
#define MCI_STATUS_TIME_FORMAT
Definition: mmsystem.h:749
#define MCI_STEP
Definition: mmsystem.h:657
#define MCI_REALIZE
Definition: mmsystem.h:664
#define MAXERRORLENGTH
Definition: mmsystem.h:25
#define MCI_RECORD
Definition: mmsystem.h:658
#define MCI_STATUS_ITEM
Definition: mmsystem.h:742
#define MCI_OPEN_ALIAS
Definition: mmsystem.h:736
static HDC
Definition: imagelist.c:92
INT WINAPI MulDiv(INT nNumber, INT nNumerator, INT nDenominator)
Definition: muldiv.c:25
#define TBM_SETRANGEMIN
Definition: commctrl.h:2038
#define TBM_SETRANGEMAX
Definition: commctrl.h:2039
const WCHAR * str
WCHAR return_string[128]
Definition: mciwnd.c:57
SIZE size
Definition: mciwnd.c:51
int alias
Definition: mciwnd.c:47
UINT uTimer
Definition: mciwnd.c:55
HDRVR hdrv
Definition: mciwnd.c:46
UINT dev_type
Definition: mciwnd.c:48
LONG cx
Definition: kdterminal.h:27
LONG cy
Definition: kdterminal.h:28
LPCWSTR lpstrElementName
Definition: mmsystem.h:1532
LPCWSTR lpstrAlias
Definition: mmsystem.h:1533
MCIDEVICEID wDeviceID
Definition: mmsystem.h:1530
DWORD_PTR dwCallback
Definition: mmsystem.h:1537
DWORD_PTR dwCallback
Definition: mmsystem.h:1607
DWORD_PTR dwReturn
Definition: mmsystem.h:1567
LONG right
Definition: windef.h:308
LONG bottom
Definition: windef.h:309
LONG top
Definition: windef.h:307
LONG left
Definition: windef.h:306
#define DWORD_PTR
Definition: treelist.c:76
#define HIWORD(l)
Definition: typedefs.h:247
#define MCIWNDM_GETLENGTH
Definition: vfw.h:1917
#define MCIWNDM_GETPOSITIONA
Definition: vfw.h:1958
#define MCIWNDM_GETTIMEFORMATW
Definition: vfw.h:1973
#define MCIWNDM_GETERRORA
Definition: vfw.h:1964
#define MCIWNDM_PLAYTO
Definition: vfw.h:1931
#define MCIWND_START
Definition: vfw.h:1999
#define MCIWNDM_GETALIAS
Definition: vfw.h:1941
#define MCIWNDM_SETOWNER
Definition: vfw.h:1955
#define MCIWNDM_GETDEVICEW
Definition: vfw.h:1975
#define MCIWND_END
Definition: vfw.h:2000
#define MCIWNDM_GETPALETTE
Definition: vfw.h:1932
#define MCIWNDM_GETEND
Definition: vfw.h:1918
#define MCIWNDM_NEWW
Definition: vfw.h:1977
#define MCIWNDM_SETACTIVETIMER
Definition: vfw.h:1935
#define MCIWNDM_REALIZE
Definition: vfw.h:1928
#define MCIWNDM_GET_SOURCE
Definition: vfw.h:1943
#define MCIWNDM_CHANGESTYLES
Definition: vfw.h:1939
#define MCIWNDM_SETZOOM
Definition: vfw.h:1920
#define MCIWNDM_PLAYREVERSE
Definition: vfw.h:1942
#define MCIWNDM_PUT_DEST
Definition: vfw.h:1946
#define MCIWNDM_PALETTEKICK
Definition: vfw.h:1953
#define MCIWNDM_PLAYFROM
Definition: vfw.h:1930
#define MCIWNDM_SETVOLUME
Definition: vfw.h:1922
#define MCIWNDM_GETSTYLES
Definition: vfw.h:1940
#define MCIWNDM_GETFILENAMEW
Definition: vfw.h:1974
#define MCIWNDM_CAN_WINDOW
Definition: vfw.h:1948
#define MCIWNDM_CAN_RECORD
Definition: vfw.h:1949
#define MCIWNDM_SETREPEAT
Definition: vfw.h:1926
#define MCIWNDM_GETACTIVETIMER
Definition: vfw.h:1937
#define MCIWNDF_NOERRORDLG
Definition: vfw.h:1807
#define MCIWNDM_GETERRORW
Definition: vfw.h:1976
#define MCIWNDM_SETSPEED
Definition: vfw.h:1924
#define MCIWNDM_GETINACTIVETIMER
Definition: vfw.h:1938
#define MCIWNDF_NOAUTOSIZEMOVIE
Definition: vfw.h:1787
#define MCIWNDM_GETSPEED
Definition: vfw.h:1925
#define MCIWNDM_CAN_SAVE
Definition: vfw.h:1950
#define MCIWNDF_NOAUTOSIZEWINDOW
Definition: vfw.h:1785
#define MCIWNDM_GETTIMEFORMATA
Definition: vfw.h:1961
#define MCIWNDM_NEWA
Definition: vfw.h:1965
#define MCIWNDM_SETINACTIVETIMER
Definition: vfw.h:1936
#define MCIWNDM_GETZOOM
Definition: vfw.h:1921
#define MCIWNDM_GETDEVICEA
Definition: vfw.h:1963
#define MCIWNDM_CAN_CONFIG
Definition: vfw.h:1952
#define MCIWNDM_OPENINTERFACE
Definition: vfw.h:1954
#define MCIWNDM_CAN_PLAY
Definition: vfw.h:1947
#define MCIWNDM_SETTIMEFORMATA
Definition: vfw.h:1960
#define MCIWNDOPENF_NEW
Definition: vfw.h:1783
#define MCIWNDM_SETTIMEFORMATW
Definition: vfw.h:1972
#define MCIWNDM_RETURNSTRINGA
Definition: vfw.h:1966
#define MCIWNDM_GET_DEST
Definition: vfw.h:1945
#define MCIWNDM_CAN_EJECT
Definition: vfw.h:1951
#define MCIWNDM_GETVOLUME
Definition: vfw.h:1923
#define MCIWNDM_EJECT
Definition: vfw.h:1919
#define MCIWNDM_GETFILENAMEA
Definition: vfw.h:1962
#define MCIWNDM_GETDEVICEID
Definition: vfw.h:1915
#define MCIWNDM_PUT_SOURCE
Definition: vfw.h:1944
#define MCIWNDM_SENDSTRINGA
Definition: vfw.h:1957
#define MCIWNDM_VALIDATEMEDIA
Definition: vfw.h:1929
#define MCIWNDM_GETREPEAT
Definition: vfw.h:1927
#define MCIWNDM_GETSTART
Definition: vfw.h:1916
#define MCIWNDM_SETTIMERS
Definition: vfw.h:1934
#define MCIWNDM_GETMODEA
Definition: vfw.h:1959
#define MCIWNDM_RETURNSTRINGW
Definition: vfw.h:1978
#define MCIWNDM_SENDSTRINGW
Definition: vfw.h:1969
#define MCIWNDM_SETPALETTE
Definition: vfw.h:1933
LONG_PTR LRESULT
Definition: windef.h:209
HICON HCURSOR
Definition: windef.h:299
#define WM_PAINT
Definition: winuser.h:1620
#define SWP_NOACTIVATE
Definition: winuser.h:1242
#define GetWindowLongPtrW
Definition: winuser.h:4829
LRESULT WINAPI DefWindowProcW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
BOOL WINAPI AdjustWindowRect(_Inout_ LPRECT, _In_ DWORD, _In_ BOOL)
#define WM_CREATE
Definition: winuser.h:1608
int WINAPIV wsprintfW(_Out_ LPWSTR, _In_ _Printf_format_string_ LPCWSTR,...)
BOOL WINAPI SetWindowPos(_In_ HWND, _In_opt_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ UINT)
#define WM_SIZE
Definition: winuser.h:1611
LONG WINAPI GetWindowLongW(_In_ HWND, _In_ int)
#define SWP_NOMOVE
Definition: winuser.h:1244
#define WM_COMMAND
Definition: winuser.h:1740
HCURSOR WINAPI SetCursor(_In_opt_ HCURSOR)
#define SWP_NOSIZE
Definition: winuser.h:1245
LRESULT WINAPI DefMDIChildProcW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
HCURSOR WINAPI LoadCursorW(_In_opt_ HINSTANCE, _In_ LPCWSTR)
Definition: cursoricon.c:2149
int WINAPI MessageBoxW(_In_opt_ HWND hWnd, _In_opt_ LPCWSTR lpText, _In_opt_ LPCWSTR lpCaption, _In_ UINT uType)
int WINAPIV wsprintfA(_Out_ LPSTR, _In_ _Printf_format_string_ LPCSTR,...)
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
UINT_PTR WINAPI SetTimer(_In_opt_ HWND, _In_ UINT_PTR, _In_ UINT, _In_opt_ TIMERPROC)
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
#define WM_NCACTIVATE
Definition: winuser.h:1688
#define WM_TIMER
Definition: winuser.h:1742
BOOL WINAPI EndPaint(_In_ HWND, _In_ const PAINTSTRUCT *)
#define MB_ICONEXCLAMATION
Definition: winuser.h:785
#define MB_OK
Definition: winuser.h:790
#define WM_USER
Definition: winuser.h:1895
#define IDC_WAIT
Definition: winuser.h:689
#define WM_DESTROY
Definition: winuser.h:1609
#define WM_KEYDOWN
Definition: winuser.h:1715
BOOL WINAPI InvalidateRect(_In_opt_ HWND, _In_opt_ LPCRECT, _In_ BOOL)
#define SWP_NOZORDER
Definition: winuser.h:1247
HDC WINAPI BeginPaint(_In_ HWND, _Out_ LPPAINTSTRUCT)
BOOL WINAPI KillTimer(_In_opt_ HWND, _In_ UINT_PTR)
#define GWL_STYLE
Definition: winuser.h:852
BOOL WINAPI DestroyWindow(_In_ HWND)
#define GWL_EXSTYLE
Definition: winuser.h:851
const char * LPCSTR
Definition: xmlstorage.h:183
char * LPSTR
Definition: xmlstorage.h:182
WCHAR * LPWSTR
Definition: xmlstorage.h:184
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185

Referenced by MCIWndRegisterClass().

◆ MCIWndRegisterClass()

BOOL VFWAPIV MCIWndRegisterClass ( void  )

Definition at line 72 of file mciwnd.c.

73{
74 WNDCLASSW wc;
75
76 /* Since we are going to register a class belonging to MSVFW32
77 * and later we will create windows with a different hInstance
78 * CS_GLOBALCLASS is needed. And because the second attempt
79 * to register a global class will fail we need to test whether
80 * the class was already registered.
81 */
84 wc.cbClsExtra = 0;
85 wc.cbWndExtra = sizeof(MCIWndInfo*);
87 wc.hIcon = 0;
89 wc.hbrBackground = (HBRUSH)(COLOR_WINDOW + 1);
90 wc.lpszMenuName = NULL;
92
93 if (RegisterClassW(&wc)) return TRUE;
95
96 return FALSE;
97}
static LRESULT WINAPI MCIWndProc(HWND hWnd, UINT wMsg, WPARAM wParam, LPARAM lParam)
Definition: mciwnd.c:445
HMODULE MSVFW32_hModule
Definition: msvideo_main.c:116
LPCWSTR lpszClassName
Definition: winuser.h:3185
LPCWSTR lpszMenuName
Definition: winuser.h:3184
HBRUSH hbrBackground
Definition: winuser.h:3183
HICON hIcon
Definition: winuser.h:3181
HINSTANCE hInstance
Definition: winuser.h:3180
int cbClsExtra
Definition: winuser.h:3178
UINT style
Definition: winuser.h:3176
WNDPROC lpfnWndProc
Definition: winuser.h:3177
int cbWndExtra
Definition: winuser.h:3179
HCURSOR hCursor
Definition: winuser.h:3182
DWORD WINAPI GetLastError(void)
Definition: except.c:1042
#define ERROR_CLASS_ALREADY_EXISTS
Definition: winerror.h:891
#define CS_VREDRAW
Definition: winuser.h:658
#define COLOR_WINDOW
Definition: winuser.h:918
#define CS_HREDRAW
Definition: winuser.h:653
ATOM WINAPI RegisterClassW(_In_ CONST WNDCLASSW *)
#define IDC_ARROW
Definition: winuser.h:687
#define CS_DBLCLKS
Definition: winuser.h:651
#define CS_GLOBALCLASS
Definition: winuser.h:652
#define CS_OWNDC
Definition: winuser.h:655

Referenced by MCIWndCreateW().

◆ WINE_DEFAULT_DEBUG_CHANNEL()

WINE_DEFAULT_DEBUG_CHANNEL ( mci  )

Variable Documentation

◆ mciWndClassW

const WCHAR mciWndClassW[] = {'M','C','I','W','n','d','C','l','a','s','s',0}
static

Definition at line 40 of file mciwnd.c.

Referenced by MCIWND_Create(), MCIWndCreateW(), and MCIWndRegisterClass().

◆ MSVFW32_hModule

HMODULE MSVFW32_hModule
extern