ReactOS 0.4.17-dev-966-gf06eace
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}
 
static const WCHAR mciWndNameW []
 

Macro Definition Documentation

◆ CTL_MENU

#define CTL_MENU   0x3201

Definition at line 66 of file mciwnd.c.

◆ CTL_PLAYSTOP

#define CTL_PLAYSTOP   0x3200

Definition at line 65 of file mciwnd.c.

◆ CTL_TRACKBAR

#define CTL_TRACKBAR   0x3202

Definition at line 67 of file mciwnd.c.

Function Documentation

◆ mci_generic_command()

static MCIERROR mci_generic_command ( MCIWndInfo *  mwi,
UINT  cmd 
)
static

Definition at line 404 of file mciwnd.c.

405{
406 MCI_GENERIC_PARMS mci_generic;
407
408 mci_generic.dwCallback = 0;
409 mwi->lasterror = mciSendCommandW(mwi->mci, cmd, 0, (DWORD_PTR)&mci_generic);
410
411 if (mwi->lasterror)
412 return mwi->lasterror;
413
416 return 0;
417}
static void MCIWND_UpdateState(MCIWndInfo *mwi)
Definition: mciwnd.c:183
static void MCIWND_notify_mode(MCIWndInfo *mwi)
Definition: mciwnd.c:145
DWORD WINAPI mciSendCommandW(MCIDEVICEID wDevID, UINT wMsg, DWORD_PTR dwParam1, DWORD_PTR dwParam2)
Definition: mci.c:2273
MCIDEVICEID mci
Definition: mciwnd.c:47
MCIERROR lasterror
Definition: mciwnd.c:58
Definition: ftp_var.h:139
DWORD_PTR dwCallback
Definition: mmsystem.h:1519
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 419 of file mciwnd.c.

420{
421 MCI_GETDEVCAPS_PARMS mci_devcaps;
422
423 mci_devcaps.dwItem = cap;
426 (DWORD_PTR)&mci_devcaps);
427 if (mwi->lasterror)
428 return 0;
429
430 return mci_devcaps.dwReturn;
431}
#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 361 of file mciwnd.c.

362{
363 switch (LOWORD(wParam))
364 {
365 case CTL_PLAYSTOP: MCIWND_ToggleState(mwi); break;
366 case CTL_MENU:
367 case CTL_TRACKBAR:
368 default:
369 FIXME("support for command %04x not implement yet\n", LOWORD(wParam));
370 }
371 return 0L;
372}
#define FIXME(fmt,...)
Definition: precomp.h:53
WPARAM wParam
Definition: combotst.c:138
#define CTL_TRACKBAR
Definition: mciwnd.c:67
#define CTL_MENU
Definition: mciwnd.c:66
#define CTL_PLAYSTOP
Definition: mciwnd.c:65
static void MCIWND_ToggleState(MCIWndInfo *mwi)
Definition: mciwnd.c:336
#define L(x)
Definition: resources.c:13
#define LOWORD(l)
Definition: pedump.c:82

Referenced by MCIWndProc().

◆ MCIWND_Create()

static LRESULT MCIWND_Create ( HWND  hWnd,
LPCREATESTRUCTW  cs 
)
static

Definition at line 251 of file mciwnd.c.

252{
253 HWND hChld;
254 MCIWndInfo *mwi;
255 static const WCHAR buttonW[] = {'b','u','t','t','o','n',0};
256
257 mwi = calloc(1, sizeof(*mwi));
258 if (!mwi) return -1;
259
260 SetWindowLongPtrW(hWnd, 0, (LPARAM)mwi);
261
262 mwi->dwStyle = cs->style;
263 /* There is no need to show stats if there is no caption */
264 if ((mwi->dwStyle & WS_CAPTION) != WS_CAPTION)
265 mwi->dwStyle &= ~MCIWNDF_SHOWALL;
266
267 mwi->hWnd = hWnd;
268 mwi->hwndOwner = cs->hwndParent;
269 mwi->active_timer = 500;
270 mwi->inactive_timer = 2000;
272 mwi->position = -1;
273 mwi->zoom = 100;
274
275 if (!(mwi->dwStyle & MCIWNDF_NOMENU))
276 {
277 static const WCHAR menuW[] = {'M','e','n','u',0};
278
279 hChld = CreateWindowExW(0, buttonW, menuW, WS_CHILD|WS_VISIBLE, 32, cs->cy, 32, 32,
280 hWnd, (HMENU)CTL_MENU, cs->hInstance, 0L);
281 TRACE("Get Button2: %p\n", hChld);
282 }
283
284 if (!(mwi->dwStyle & MCIWNDF_NOPLAYBAR))
285 {
287 static const WCHAR playW[] = {'P','l','a','y',0};
288
289 /* adding the other elements: play/stop button, menu button, status */
290 hChld = CreateWindowExW(0, buttonW, playW, WS_CHILD|WS_VISIBLE, 0, cs->cy, 32, 32,
291 hWnd, (HMENU)CTL_PLAYSTOP, cs->hInstance, 0L);
292 TRACE("Get Button1: %p\n", hChld);
293
294 init.dwSize = sizeof(init);
295 init.dwICC = ICC_BAR_CLASSES;
297
298 hChld = CreateWindowExW(0, TRACKBAR_CLASSW, NULL, WS_CHILD|WS_VISIBLE, 64, cs->cy, cs->cx - 64, 32,
299 hWnd, (HMENU)CTL_TRACKBAR, cs->hInstance, 0L);
300 TRACE("Get status: %p\n", hChld);
301 }
302
303 /* This sets the default window size */
305
306 if (cs->lpCreateParams)
307 {
309
310 /* MCI wnd class is prepared to be embedded as an MDI child window */
311 if (cs->dwExStyle & WS_EX_MDICHILD)
312 {
313 MDICREATESTRUCTW *mdics = cs->lpCreateParams;
314 lParam = mdics->lParam;
315 }
316 else
317 lParam = (LPARAM)cs->lpCreateParams;
318
319 /* If it's our internal window name, we are being called from MCIWndCreateA/W,
320 * so file name is a unicode string */
321 if (!lstrcmpW(cs->lpszName, mciWndNameW))
323 else
324 {
325 /* Otherwise let's try to figure out what string format is used */
326 HWND parent = cs->hwndParent;
328
330 }
331 }
332
333 return 0;
334}
HWND hWnd
Definition: settings.c:17
LPARAM lParam
Definition: combotst.c:139
BOOL WINAPI InitCommonControlsEx(const INITCOMMONCONTROLSEX *lpInitCtrls)
Definition: commctrl.c:904
#define NULL
Definition: types.h:112
int WINAPI lstrcmpW(LPCWSTR str1, LPCWSTR str2)
Definition: locale.c:4152
static const WCHAR mciWndNameW[]
Definition: mciwnd.c:41
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
LONG_PTR LPARAM
Definition: minwindef.h:175
#define MCI_CLOSE
Definition: mmsystem.h:647
#define MCI_MODE_NOT_READY
Definition: mmsystem.h:694
static const WCHAR menuW[]
Definition: itemdlg.c:1610
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
Definition: ordinal.c:60
#define WS_CHILD
Definition: pedump.c:617
#define WS_CAPTION
Definition: pedump.c:624
short WCHAR
Definition: pedump.c:58
#define WS_VISIBLE
Definition: pedump.c:620
#define TRACKBAR_CLASSW
Definition: commctrl.h:2016
#define ICC_BAR_CLASSES
Definition: commctrl.h:60
#define GW_OWNER
Definition: winuser.h:777
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)
#define SetWindowLongPtrW
Definition: winuser.h:5512
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define calloc
Definition: rosglue.h:14
#define TRACE(s)
Definition: solgame.cpp:4
UINT mode
Definition: mciwnd.c:51
WORD inactive_timer
Definition: mciwnd.c:60
HWND hWnd
Definition: mciwnd.c:56
WORD active_timer
Definition: mciwnd.c:60
LONG position
Definition: mciwnd.c:52
HWND hwndOwner
Definition: mciwnd.c:56
int zoom
Definition: mciwnd.c:54
DWORD dwStyle
Definition: mciwnd.c:46
#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
static int init
Definition: wintirpc.c:33

Referenced by MCIWndProc().

◆ MCIWND_KeyDown()

static LRESULT MCIWND_KeyDown ( MCIWndInfo *  mwi,
UINT  key 
)
static

Definition at line 433 of file mciwnd.c.

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

Referenced by MCIWndProc().

◆ MCIWND_notify_error()

static void MCIWND_notify_error ( MCIWndInfo *  mwi)
inlinestatic

Definition at line 177 of file mciwnd.c.

178{
179 if (mwi->dwStyle & MCIWNDF_NOTIFYERROR)
181}
UINT_PTR WPARAM
Definition: minwindef.h:174
#define MCIWNDM_NOTIFYERROR
Definition: vfw.h:1997
#define MCIWNDF_NOTIFYERROR
Definition: vfw.h:1797

Referenced by MCIWndProc().

◆ MCIWND_notify_media()

static void MCIWND_notify_media ( MCIWndInfo *  mwi)
static

Definition at line 374 of file mciwnd.c.

375{
377 {
378 if (!mwi->lpName)
379 {
380 static const WCHAR empty_str[1];
382 }
383 else
384 {
385 if (mwi->dwStyle & MCIWNDF_NOTIFYANSI)
386 {
387 char *ansi_name;
388 int len;
389
390 len = WideCharToMultiByte(CP_ACP, 0, mwi->lpName, -1, NULL, 0, NULL, NULL);
391 ansi_name = malloc(len);
392 WideCharToMultiByte(CP_ACP, 0, mwi->lpName, -1, ansi_name, len, NULL, NULL);
393
395
396 free(ansi_name);
397 }
398 else
400 }
401 }
402}
static const TCHAR empty_str[]
Definition: dialog.c:20
#define free
Definition: debug_ros.c:5
#define malloc
Definition: debug_ros.c:4
#define CP_ACP
Definition: compat.h:109
#define WideCharToMultiByte
Definition: compat.h:111
GLenum GLsizei len
Definition: glext.h:6722
LPWSTR lpName
Definition: mciwnd.c:55
#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 145 of file mciwnd.c.

146{
147 if (mwi->dwStyle & MCIWNDF_NOTIFYMODE)
148 {
149 UINT new_mode = SendMessageW(mwi->hWnd, MCIWNDM_GETMODEW, 0, 0);
150 if (new_mode != mwi->mode)
151 {
152 mwi->mode = new_mode;
153 SendMessageW(mwi->hwndOwner, MCIWNDM_NOTIFYMODE, (WPARAM)mwi->hWnd, new_mode);
154 }
155 }
156}
unsigned int UINT
Definition: sysinfo.c:13
#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 158 of file mciwnd.c.

159{
160 if (mwi->dwStyle & MCIWNDF_NOTIFYPOS)
161 {
162 LONG new_pos = SendMessageW(mwi->hWnd, MCIWNDM_GETPOSITIONW, 0, 0);
163 if (new_pos != mwi->position)
164 {
165 mwi->position = new_pos;
166 SendMessageW(mwi->hwndOwner, MCIWNDM_NOTIFYPOS, (WPARAM)mwi->hWnd, new_pos);
167 }
168 }
169}
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 171 of file mciwnd.c.

172{
173 if (mwi->dwStyle & MCIWNDF_NOTIFYSIZE)
175}
#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 336 of file mciwnd.c.

337{
338 switch (SendMessageW(mwi->hWnd, MCIWNDM_GETMODEW, 0, 0))
339 {
341 case MCI_MODE_RECORD:
342 case MCI_MODE_SEEK:
343 case MCI_MODE_OPEN:
344 TRACE("Cannot do much...\n");
345 break;
346
347 case MCI_MODE_PAUSE:
348 SendMessageW(mwi->hWnd, MCI_RESUME, 0, 0);
349 break;
350
351 case MCI_MODE_PLAY:
352 SendMessageW(mwi->hWnd, MCI_PAUSE, 0, 0);
353 break;
354
355 case MCI_MODE_STOP:
356 SendMessageW(mwi->hWnd, MCI_STOP, 0, 0);
357 break;
358 }
359}
#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 183 of file mciwnd.c.

184{
185 WCHAR buffer[1024];
186
187 if (!mwi->mci)
188 {
189 /* FIXME: get this from resources */
190 static const WCHAR no_deviceW[] = {'N','o',' ','D','e','v','i','c','e',0};
191 SetWindowTextW(mwi->hWnd, no_deviceW);
192 return;
193 }
194
196
197 if (!(mwi->dwStyle & MCIWNDF_NOPLAYBAR))
199
200 if (!(mwi->dwStyle & MCIWNDF_SHOWALL))
201 return;
202
203 if ((mwi->dwStyle & MCIWNDF_SHOWNAME) && mwi->lpName)
204 lstrcpyW(buffer, mwi->lpName);
205 else
206 *buffer = 0;
207
209 {
210 static const WCHAR spaceW[] = {' ',0};
211 static const WCHAR l_braceW[] = {'(',0};
212
214 lstrcatW(buffer, l_braceW);
215 }
216
217 if (mwi->dwStyle & MCIWNDF_SHOWPOS)
218 {
219 WCHAR posW[64];
220
221 posW[0] = 0;
223 lstrcatW(buffer, posW);
224 }
225
227 {
228 static const WCHAR dashW[] = {' ','-',' ',0};
229 lstrcatW(buffer, dashW);
230 }
231
232 if (mwi->dwStyle & MCIWNDF_SHOWMODE)
233 {
234 WCHAR modeW[64];
235
236 modeW[0] = 0;
237 SendMessageW(mwi->hWnd, MCIWNDM_GETMODEW, 64, (LPARAM)modeW);
238 lstrcatW(buffer, modeW);
239 }
240
242 {
243 static const WCHAR r_braceW[] = {')',0};
244 lstrcatW(buffer, r_braceW);
245 }
246
247 TRACE("=> %s\n", debugstr_w(buffer));
249}
#define TRUE
Definition: types.h:120
#define lstrcpyW
Definition: compat.h:749
static void MCIWND_notify_pos(MCIWndInfo *mwi)
Definition: mciwnd.c:158
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:39
#define TBM_SETPOS
Definition: commctrl.h:2041
LRESULT WINAPI SendDlgItemMessageW(_In_ HWND, _In_ int, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
BOOL WINAPI SetWindowTextW(_In_ HWND, _In_opt_ LPCWSTR)
#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

Referenced by mci_generic_command(), and MCIWndProc().

◆ MCIWndCreateA()

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

Definition at line 128 of file mciwnd.c.

130{
131 HWND ret;
132 UNICODE_STRING fileW;
133
134 if (szFile)
135 RtlCreateUnicodeStringFromAsciiz(&fileW, szFile);
136 else
137 fileW.Buffer = NULL;
138
139 ret = MCIWndCreateW(hwndParent, hInstance, dwStyle, fileW.Buffer);
140
141 RtlFreeUnicodeString(&fileW);
142 return ret;
143}
HINSTANCE hInstance
Definition: charmap.c:19
static HWND hwndParent
Definition: cryptui.c:299
HWND VFWAPIV MCIWndCreateW(HWND hwndParent, HINSTANCE hInstance, DWORD dwStyle, LPCWSTR szFile)
Definition: mciwnd.c:104
return ret
Definition: mutex.c:147
NTSYSAPI BOOLEAN NTAPI RtlCreateUnicodeStringFromAsciiz(_Out_ PUNICODE_STRING Destination, _In_ PCSZ Source)
NTSYSAPI VOID NTAPI RtlFreeUnicodeString(PUNICODE_STRING UnicodeString)

Referenced by test_MCIWndCreate(), and test_window_create().

◆ MCIWndCreateW()

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

Definition at line 104 of file mciwnd.c.

106{
107 TRACE("%p %p %lx %s\n", hwndParent, hInstance, dwStyle, debugstr_w(szFile));
108
110
112
113 if (hwndParent)
114 dwStyle |= WS_VISIBLE | WS_BORDER /*| WS_CHILD*/;
115 else
117
120 0, 0, 300, 0,
121 hwndParent, 0, hInstance, (LPVOID)szFile);
122}
HMODULE WINAPI GetModuleHandleW(LPCWSTR lpModuleName)
Definition: loader.c:838
BOOL VFWAPIV MCIWndRegisterClass(void)
Definition: mciwnd.c:74
static const WCHAR mciWndClassW[]
Definition: mciwnd.c:40
#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(), and test_window_create().

◆ MCIWndProc()

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

Definition at line 448 of file mciwnd.c.

449{
450 MCIWndInfo *mwi;
451
452 TRACE("%p %04x %08Ix %08Ix\n", hWnd, wMsg, wParam, lParam);
453
455 if (!mwi && wMsg != WM_CREATE)
456 return DefWindowProcW(hWnd, wMsg, wParam, lParam);
457
458 switch (wMsg)
459 {
460 case WM_CREATE:
462 break;
463
464 case WM_DESTROY:
465 if (mwi->uTimer)
466 KillTimer(hWnd, mwi->uTimer);
467
468 if (mwi->mci)
470
471 free(mwi);
472
476 break;
477
478 case WM_PAINT:
479 {
480 MCI_DGV_UPDATE_PARMS mci_update;
481 PAINTSTRUCT ps;
482
483 mci_update.hDC = (wParam) ? (HDC)wParam : BeginPaint(hWnd, &ps);
484
487 (DWORD_PTR)&mci_update);
488
489 if (!wParam) EndPaint(hWnd, &ps);
490 return 1;
491 }
492
493 case WM_COMMAND:
494 return MCIWND_Command(mwi, wParam, lParam);
495
496 case WM_KEYDOWN:
497 return MCIWND_KeyDown(mwi, wParam);
498
499 case WM_NCACTIVATE:
500 if (mwi->uTimer)
501 {
502 KillTimer(hWnd, mwi->uTimer);
503 mwi->uTimer = SetTimer(hWnd, 1, wParam ? mwi->active_timer : mwi->inactive_timer, NULL);
504 }
505 break;
506
507 case WM_TIMER:
509 return 0;
510
511 case WM_SIZE:
515
516 if (!(mwi->dwStyle & MCIWNDF_NOAUTOSIZEMOVIE))
517 {
518 RECT rc;
519
520 rc.left = rc.top = 0;
521 rc.right = LOWORD(lParam);
522 rc.bottom = HIWORD(lParam);
523 if (!(mwi->dwStyle & MCIWNDF_NOPLAYBAR))
524 rc.bottom -= 32; /* subtract the height of the playbar */
526 }
528 break;
529
530 case MM_MCINOTIFY:
533 return 0;
534
535 case MCIWNDM_OPENA:
536 {
538 TRACE("MCIWNDM_OPENA %s\n", debugstr_a((LPSTR)lParam));
540 lParam = (LPARAM)nameW.Buffer;
541 }
542 /* fall through */
543 case MCIWNDM_OPENW:
544 {
545 RECT rc;
546 HCURSOR hCursor;
547 MCI_OPEN_PARMSW mci_open;
548 MCI_GETDEVCAPS_PARMS mci_devcaps;
549 WCHAR aliasW[64];
550 WCHAR drv_name[MAX_PATH];
551 static const WCHAR formatW[] = {'%','d',0};
552 static const WCHAR mci32W[] = {'m','c','i','3','2',0};
553 static const WCHAR system_iniW[] = {'s','y','s','t','e','m','.','i','n','i',0};
554
555 TRACE("MCIWNDM_OPENW %s\n", debugstr_w((LPWSTR)lParam));
556
557 if (wParam == MCIWNDOPENF_NEW)
558 {
560 goto end_of_mci_open;
561 }
562
563 if (mwi->uTimer)
564 {
565 KillTimer(hWnd, mwi->uTimer);
566 mwi->uTimer = 0;
567 }
568
569 hCursor = LoadCursorW(0, (LPWSTR)IDC_WAIT);
570 hCursor = SetCursor(hCursor);
571
572 mci_open.lpstrElementName = (LPWSTR)lParam;
573 wsprintfW(aliasW, formatW, HandleToLong(hWnd) + 1);
574 mci_open.lpstrAlias = aliasW;
577 (DWORD_PTR)&mci_open);
578 SetCursor(hCursor);
579
580 if (mwi->lasterror && !(mwi->dwStyle & MCIWNDF_NOERRORDLG))
581 {
582 /* FIXME: get the caption from resources */
583 static const WCHAR caption[] = {'M','C','I',' ','E','r','r','o','r',0};
584 WCHAR error_str[MAXERRORLENGTH];
585
587 MessageBoxW(hWnd, error_str, caption, MB_ICONEXCLAMATION | MB_OK);
589 goto end_of_mci_open;
590 }
591
592 mwi->mci = mci_open.wDeviceID;
593 mwi->alias = HandleToLong(hWnd) + 1;
594 mwi->lpName = wcsdup((WCHAR *)lParam);
595
597
601 (DWORD_PTR)&mci_devcaps);
602 if (mwi->lasterror)
603 {
605 goto end_of_mci_open;
606 }
607
608 mwi->dev_type = mci_devcaps.dwReturn;
609
610 drv_name[0] = 0;
611 SendMessageW(hWnd, MCIWNDM_GETDEVICEW, 256, (LPARAM)drv_name);
612 if (drv_name[0] && GetPrivateProfileStringW(mci32W, drv_name, NULL,
613 drv_name, MAX_PATH, system_iniW))
614 mwi->hdrv = OpenDriver(drv_name, NULL, 0);
615
617 {
618 MCI_DGV_WINDOW_PARMSW mci_window;
619
620 mci_window.hWnd = hWnd;
623 (DWORD_PTR)&mci_window);
624 if (mwi->lasterror)
625 {
627 goto end_of_mci_open;
628 }
629 }
630
631 if (SendMessageW(hWnd, MCIWNDM_GET_DEST, 0, (LPARAM)&rc) == 0)
632 {
633 mwi->size.cx = rc.right - rc.left;
634 mwi->size.cy = rc.bottom - rc.top;
635
636 rc.right = MulDiv(mwi->size.cx, mwi->zoom, 100);
637 rc.bottom = MulDiv(mwi->size.cy, mwi->zoom, 100);
639 }
640 else
641 {
642 GetClientRect(hWnd, &rc);
643 rc.bottom = rc.top;
644 }
645
646 if (!(mwi->dwStyle & MCIWNDF_NOPLAYBAR))
647 rc.bottom += 32; /* add the height of the playbar */
649 SetWindowPos(hWnd, 0, 0, 0, rc.right - rc.left,
650 rc.bottom - rc.top, SWP_NOMOVE | SWP_NOZORDER | SWP_NOACTIVATE);
651
655 mwi->uTimer = SetTimer(hWnd, 1, mwi->active_timer, NULL);
656
658
659end_of_mci_open:
660 if (wMsg == MCIWNDM_OPENA)
661 free((void *)lParam);
662 return mwi->lasterror;
663 }
664
666 TRACE("MCIWNDM_GETDEVICEID\n");
667 return mwi->mci;
668
669 case MCIWNDM_GETALIAS:
670 TRACE("MCIWNDM_GETALIAS\n");
671 return mwi->alias;
672
674 {
675 MCI_DGV_RECT_PARMS mci_rect;
676
679 (DWORD_PTR)&mci_rect);
680 if (mwi->lasterror)
681 {
683 return mwi->lasterror;
684 }
685 *(RECT *)lParam = mci_rect.rc;
686 TRACE("MCIWNDM_GET_SOURCE: %s\n", wine_dbgstr_rect(&mci_rect.rc));
687 return 0;
688 }
689
690 case MCIWNDM_GET_DEST:
691 {
692 MCI_DGV_RECT_PARMS mci_rect;
693
696 (DWORD_PTR)&mci_rect);
697 if (mwi->lasterror)
698 {
700 return mwi->lasterror;
701 }
702 *(RECT *)lParam = mci_rect.rc;
703 TRACE("MCIWNDM_GET_DEST: %s\n", wine_dbgstr_rect(&mci_rect.rc));
704 return 0;
705 }
706
708 {
709 MCI_DGV_PUT_PARMS mci_put;
710
711 mci_put.rc = *(RECT *)lParam;
712 TRACE("MCIWNDM_PUT_SOURCE: %s\n", wine_dbgstr_rect(&mci_put.rc));
715 (DWORD_PTR)&mci_put);
716 if (mwi->lasterror)
717 {
719 return mwi->lasterror;
720 }
721 return 0;
722 }
723
724 case MCIWNDM_PUT_DEST:
725 {
726 MCI_DGV_PUT_PARMS mci_put;
727
728 mci_put.rc = *(RECT *)lParam;
729 TRACE("MCIWNDM_PUT_DEST: %s\n", wine_dbgstr_rect(&mci_put.rc));
730
733 (DWORD_PTR)&mci_put);
734 if (mwi->lasterror)
735 {
737 return mwi->lasterror;
738 }
739 return 0;
740 }
741
743 {
744 MCI_STATUS_PARMS mci_status;
745
746 mci_status.dwItem = MCI_STATUS_LENGTH;
749 (DWORD_PTR)&mci_status);
750 if (mwi->lasterror)
751 {
753 return 0;
754 }
755 TRACE("MCIWNDM_GETLENGTH: %Id\n", mci_status.dwReturn);
756 return mci_status.dwReturn;
757 }
758
759 case MCIWNDM_GETSTART:
760 {
761 MCI_STATUS_PARMS mci_status;
762
763 mci_status.dwItem = MCI_STATUS_POSITION;
766 (DWORD_PTR)&mci_status);
767 if (mwi->lasterror)
768 {
770 return 0;
771 }
772 TRACE("MCIWNDM_GETSTART: %Id\n", mci_status.dwReturn);
773 return mci_status.dwReturn;
774 }
775
776 case MCIWNDM_GETEND:
777 {
779
782 TRACE("MCIWNDM_GETEND: %Id\n", start + length);
783 return (start + length);
784 }
785
788 {
789 MCI_STATUS_PARMS mci_status;
790
791 TRACE("MCIWNDM_GETPOSITION\n");
792
793 /* get position string if requested */
794 if (wParam && lParam)
795 {
796 if (wMsg == MCIWNDM_GETPOSITIONA)
797 {
798 char cmd[64];
799
800 wsprintfA(cmd, "status %d position", mwi->alias);
802 }
803 else
804 {
805
806 WCHAR cmdW[64];
807 static const WCHAR formatW[] = {'s','t','a','t','u','s',' ','%','d',' ','p','o','s','i','t','i','o','n',0};
808
809 wsprintfW(cmdW, formatW, mwi->alias);
810 mwi->lasterror = mciSendStringW(cmdW, (LPWSTR)lParam, wParam, 0);
811 }
812
813 if (mwi->lasterror)
814 return 0;
815 }
816
817 mci_status.dwItem = MCI_STATUS_POSITION;
820 (DWORD_PTR)&mci_status);
821 if (mwi->lasterror)
822 return 0;
823
824 return mci_status.dwReturn;
825 }
826
827 case MCIWNDM_GETMODEA:
828 case MCIWNDM_GETMODEW:
829 {
830 MCI_STATUS_PARMS mci_status;
831
832 TRACE("MCIWNDM_GETMODE\n");
833
834 if (!mwi->mci)
835 return MCI_MODE_NOT_READY;
836
837 /* get mode string if requested */
838 if (wParam && lParam)
839 {
840 if (wMsg == MCIWNDM_GETMODEA)
841 {
842 char cmd[64];
843
844 wsprintfA(cmd, "status %d mode", mwi->alias);
846 }
847 else
848 {
849
850 WCHAR cmdW[64];
851 static const WCHAR formatW[] = {'s','t','a','t','u','s',' ','%','d',' ','m','o','d','e',0};
852
853 wsprintfW(cmdW, formatW, mwi->alias);
854 mwi->lasterror = mciSendStringW(cmdW, (LPWSTR)lParam, wParam, 0);
855 }
856
857 if (mwi->lasterror)
858 return MCI_MODE_NOT_READY;
859 }
860
861 mci_status.dwItem = MCI_STATUS_MODE;
864 (DWORD_PTR)&mci_status);
865 if (mwi->lasterror)
866 return MCI_MODE_NOT_READY;
867
868 return mci_status.dwReturn;
869 }
870
871 case MCIWNDM_PLAYFROM:
872 {
873 MCI_PLAY_PARMS mci_play;
874
875 TRACE("MCIWNDM_PLAYFROM %08Ix\n", lParam);
876
877 mci_play.dwCallback = (DWORD_PTR)hWnd;
878 mci_play.dwFrom = lParam;
881 (DWORD_PTR)&mci_play);
882 if (mwi->lasterror)
883 {
885 return mwi->lasterror;
886 }
887
890 return 0;
891 }
892
893 case MCIWNDM_PLAYTO:
894 {
895 MCI_PLAY_PARMS mci_play;
896
897 TRACE("MCIWNDM_PLAYTO %08Ix\n", lParam);
898
899 mci_play.dwCallback = (DWORD_PTR)hWnd;
900 mci_play.dwTo = lParam;
903 (DWORD_PTR)&mci_play);
904 if (mwi->lasterror)
905 {
907 return mwi->lasterror;
908 }
909
912 return 0;
913 }
914
916 {
917 MCI_PLAY_PARMS mci_play;
919
920 TRACE("MCIWNDM_PLAYREVERSE %08Ix\n", lParam);
921
922 mci_play.dwCallback = (DWORD_PTR)hWnd;
923 mci_play.dwFrom = lParam;
924 switch (mwi->dev_type)
925 {
926 default:
929 break;
930
933 break;
934
935#ifdef MCI_VCR_PLAY_REVERSE
936 case MCI_DEVTYPE_VCR:
937 flags |= MCI_VCR_PLAY_REVERSE;
938 break;
939#endif
940
943 break;
944
945 }
947 flags, (DWORD_PTR)&mci_play);
948 if (mwi->lasterror)
949 {
951 return mwi->lasterror;
952 }
953
956 return 0;
957 }
958
961 TRACE("MCIWNDM_GETERRORA: %s\n", debugstr_an((LPSTR)lParam, wParam));
962 return mwi->lasterror;
963
966 TRACE("MCIWNDM_GETERRORW: %s\n", debugstr_wn((LPWSTR)lParam, wParam));
967 return mwi->lasterror;
968
969 case MCIWNDM_SETOWNER:
970 TRACE("MCIWNDM_SETOWNER %p\n", (HWND)wParam);
971 mwi->hwndOwner = (HWND)wParam;
972 return 0;
973
975 {
977
978 TRACE("MCIWNDM_SENDSTRINGA %s\n", debugstr_a((LPCSTR)lParam));
979
981 lParam = (LPARAM)stringW.Buffer;
982 }
983 /* fall through */
985 {
986 WCHAR *cmdW, *p;
987
988 TRACE("MCIWNDM_SENDSTRINGW %s\n", debugstr_w((LPCWSTR)lParam));
989
990 p = wcschr((LPCWSTR)lParam, ' ');
991 if (p)
992 {
993 static const WCHAR formatW[] = {'%','d',' ',0};
994 int len, pos;
995
996 pos = p - (WCHAR *)lParam + 1;
997 len = lstrlenW((LPCWSTR)lParam) + 64;
998
999 cmdW = malloc(len * sizeof(WCHAR));
1000
1001 memcpy(cmdW, (void *)lParam, pos * sizeof(WCHAR));
1002 wsprintfW(cmdW + pos, formatW, mwi->alias);
1003 lstrcatW(cmdW, (WCHAR *)lParam + pos);
1004 }
1005 else
1006 cmdW = (LPWSTR)lParam;
1007
1008 mwi->lasterror = mciSendStringW(cmdW, mwi->return_string,
1009 ARRAY_SIZE(mwi->return_string), 0);
1010 if (mwi->lasterror)
1012
1013 if (cmdW != (LPWSTR)lParam)
1014 free(cmdW);
1015
1016 if (wMsg == MCIWNDM_SENDSTRINGA)
1017 free((void *)lParam);
1018
1019 MCIWND_UpdateState(mwi);
1020 return mwi->lasterror;
1021 }
1022
1025 TRACE("MCIWNDM_RETURNTRINGA %s\n", debugstr_an((LPSTR)lParam, wParam));
1026 return mwi->lasterror;
1027
1030 TRACE("MCIWNDM_RETURNTRINGW %s\n", debugstr_wn((LPWSTR)lParam, wParam));
1031 return mwi->lasterror;
1032
1033 case MCIWNDM_SETTIMERS:
1034 TRACE("MCIWNDM_SETTIMERS active %d ms, inactive %d ms\n", (int)wParam, (int)lParam);
1035 mwi->active_timer = (WORD)wParam;
1036 mwi->inactive_timer = (WORD)lParam;
1037 return 0;
1038
1040 TRACE("MCIWNDM_SETACTIVETIMER %d ms\n", (int)wParam);
1041 mwi->active_timer = (WORD)wParam;
1042 return 0;
1043
1045 TRACE("MCIWNDM_SETINACTIVETIMER %d ms\n", (int)wParam);
1046 mwi->inactive_timer = (WORD)wParam;
1047 return 0;
1048
1050 TRACE("MCIWNDM_GETACTIVETIMER: %d ms\n", mwi->active_timer);
1051 return mwi->active_timer;
1052
1054 TRACE("MCIWNDM_GETINACTIVETIMER: %d ms\n", mwi->inactive_timer);
1055 return mwi->inactive_timer;
1056
1058 TRACE("MCIWNDM_CHANGESTYLES mask %08Ix, set %08Ix\n", wParam, lParam);
1059 /* FIXME: update the visual window state as well:
1060 * add/remove trackbar, autosize, etc.
1061 */
1062 mwi->dwStyle &= ~wParam;
1063 mwi->dwStyle |= lParam & wParam;
1064 return 0;
1065
1066 case MCIWNDM_GETSTYLES:
1067 TRACE("MCIWNDM_GETSTYLES: %08lx\n", mwi->dwStyle & 0xffff);
1068 return mwi->dwStyle & 0xffff;
1069
1070 case MCIWNDM_GETDEVICEA:
1071 {
1072 int len = 0;
1073 char *str = (char *)lParam;
1074 MCI_SYSINFO_PARMSA mci_sysinfo;
1075
1076 mci_sysinfo.lpstrReturn = str;
1077 mci_sysinfo.dwRetSize = wParam;
1080 (DWORD_PTR)&mci_sysinfo);
1081 while(len < wParam && str[len]) len++;
1082 TRACE("MCIWNDM_GETDEVICEA: %s\n", debugstr_an(str, len));
1083 return 0;
1084 }
1085
1086 case MCIWNDM_GETDEVICEW:
1087 {
1088 int len = 0;
1089 WCHAR *str = (WCHAR *)lParam;
1090 MCI_SYSINFO_PARMSW mci_sysinfo;
1091
1092 mci_sysinfo.lpstrReturn = str;
1093 mci_sysinfo.dwRetSize = wParam;
1096 (DWORD_PTR)&mci_sysinfo);
1097 while(len < wParam && str[len]) len++;
1098 TRACE("MCIWNDM_GETDEVICEW: %s\n", debugstr_wn(str, len));
1099 return 0;
1100 }
1101
1103 TRACE("MCIWNDM_VALIDATEMEDIA\n");
1104 if (mwi->mci)
1105 {
1108 }
1109 return 0;
1110
1112 TRACE("MCIWNDM_GETFILENAMEA: %s\n", debugstr_w(mwi->lpName));
1113 if (mwi->lpName)
1115 return 0;
1116
1118 TRACE("MCIWNDM_GETFILENAMEW: %s\n", debugstr_w(mwi->lpName));
1119 if (mwi->lpName)
1121 return 0;
1122
1125 {
1126 MCI_STATUS_PARMS mci_status;
1127
1128 TRACE("MCIWNDM_GETTIMEFORMAT %08Ix %08Ix\n", wParam, lParam);
1129
1130 /* get format string if requested */
1131 if (wParam && lParam)
1132 {
1133 if (wMsg == MCIWNDM_GETTIMEFORMATA)
1134 {
1135 char cmd[64];
1136
1137 wsprintfA(cmd, "status %d time format", mwi->alias);
1139 if (mwi->lasterror)
1140 return 0;
1141 }
1142 else
1143 {
1144 WCHAR cmdW[64];
1145 static const WCHAR formatW[] = {'s','t','a','t','u','s',' ','%','d',' ','t','i','m','e',' ','f','o','r','m','a','t',0};
1146
1147 wsprintfW(cmdW, formatW, mwi->alias);
1148 mwi->lasterror = mciSendStringW(cmdW, (LPWSTR)lParam, wParam, 0);
1149 if (mwi->lasterror)
1150 return 0;
1151 }
1152 }
1153
1154 mci_status.dwItem = MCI_STATUS_TIME_FORMAT ;
1157 (DWORD_PTR)&mci_status);
1158 if (mwi->lasterror)
1159 return 0;
1160
1161 return mci_status.dwReturn;
1162 }
1163
1165 {
1167
1168 TRACE("MCIWNDM_SETTIMEFORMATA %s\n", debugstr_a((LPSTR)lParam));
1169
1171 lParam = (LPARAM)stringW.Buffer;
1172 }
1173 /* fall through */
1175 {
1176 static const WCHAR formatW[] = {'s','e','t',' ','%','d',' ','t','i','m','e',' ','f','o','r','m','a','t',' ',0};
1177 WCHAR *cmdW;
1178
1179 TRACE("MCIWNDM_SETTIMEFORMATW %s\n", debugstr_w((LPWSTR)lParam));
1180
1181 if (mwi->mci)
1182 {
1183 cmdW = malloc((wcslen((WCHAR *)lParam) + 64) * sizeof(WCHAR));
1184 wsprintfW(cmdW, formatW, mwi->alias);
1185 lstrcatW(cmdW, (WCHAR *)lParam);
1186
1187 mwi->lasterror = mciSendStringW(cmdW, NULL, 0, 0);
1188
1189 /* fix the range tracking according to the new time format */
1190 if (!mwi->lasterror)
1193
1194 free(cmdW);
1195 }
1196
1197 if (wMsg == MCIWNDM_SETTIMEFORMATA)
1198 free((void *)lParam);
1199
1200 return 0;
1201 }
1202
1203 case MCIWNDM_CAN_PLAY:
1204 TRACE("MCIWNDM_CAN_PLAY\n");
1205 if (mwi->mci)
1207 return 0;
1208
1209 case MCIWNDM_CAN_RECORD:
1210 TRACE("MCIWNDM_CAN_RECORD\n");
1211 if (mwi->mci)
1213 return 0;
1214
1215 case MCIWNDM_CAN_SAVE:
1216 TRACE("MCIWNDM_CAN_SAVE\n");
1217 if (mwi->mci)
1219 return 0;
1220
1221 case MCIWNDM_CAN_EJECT:
1222 TRACE("MCIWNDM_CAN_EJECT\n");
1223 if (mwi->mci)
1225 return 0;
1226
1227 case MCIWNDM_CAN_WINDOW:
1228 TRACE("MCIWNDM_CAN_WINDOW\n");
1229 switch (mwi->dev_type)
1230 {
1234 return 1;
1235 }
1236 return 0;
1237
1238 case MCIWNDM_CAN_CONFIG:
1239 TRACE("MCIWNDM_CAN_CONFIG\n");
1240 if (mwi->hdrv)
1241 return SendDriverMessage(mwi->hdrv, DRV_QUERYCONFIGURE, 0, 0);
1242 return 0;
1243
1244 case MCIWNDM_SETZOOM:
1245 TRACE("MCIWNDM_SETZOOM %Id\n", lParam);
1246 mwi->zoom = lParam;
1247
1248 if (mwi->mci && !(mwi->dwStyle & MCIWNDF_NOAUTOSIZEWINDOW))
1249 {
1250 RECT rc;
1251
1252 rc.left = rc.top = 0;
1253 rc.right = MulDiv(mwi->size.cx, mwi->zoom, 100);
1254 rc.bottom = MulDiv(mwi->size.cy, mwi->zoom, 100);
1255
1256 if (!(mwi->dwStyle & MCIWNDF_NOPLAYBAR))
1257 rc.bottom += 32; /* add the height of the playbar */
1259 SetWindowPos(hWnd, 0, 0, 0, rc.right - rc.left, rc.bottom - rc.top,
1261 }
1262 return 0;
1263
1264 case MCIWNDM_GETZOOM:
1265 TRACE("MCIWNDM_GETZOOM: %d\n", mwi->zoom);
1266 return mwi->zoom;
1267
1268 case MCIWNDM_EJECT:
1269 {
1270 MCI_SET_PARMS mci_set;
1271
1272 TRACE("MCIWNDM_EJECT\n");
1273
1274 mci_set.dwCallback = (DWORD_PTR)hWnd;
1275 mwi->lasterror = mciSendCommandW(mwi->mci, MCI_SET,
1277 (DWORD_PTR)&mci_set);
1278 MCIWND_notify_mode(mwi);
1279 MCIWND_UpdateState(mwi);
1280 return mwi->lasterror;
1281 }
1282
1283 case MCIWNDM_SETVOLUME:
1284 case MCIWNDM_GETVOLUME:
1285 case MCIWNDM_SETSPEED:
1286 case MCIWNDM_GETSPEED:
1287 case MCIWNDM_SETREPEAT:
1288 case MCIWNDM_GETREPEAT:
1289 case MCIWNDM_REALIZE:
1290 case MCIWNDM_GETPALETTE:
1291 case MCIWNDM_SETPALETTE:
1292 case MCIWNDM_NEWA:
1293 case MCIWNDM_NEWW:
1296 FIXME("support for MCIWNDM_ message WM_USER+%d not implemented\n", wMsg - WM_USER);
1297 return 0;
1298
1299 case MCI_PLAY:
1300 {
1302 return SendMessageW(hWnd, MCIWNDM_PLAYTO, 0, end);
1303 }
1304
1305 case MCI_SEEK:
1306 case MCI_STEP:
1307 {
1308 MCI_SEEK_PARMS mci_seek; /* Layout is usable as MCI_XYZ_STEP_PARMS */
1309 DWORD flags = MCI_STEP == wMsg ? 0 :
1312
1313 mci_seek.dwTo = lParam;
1314 mwi->lasterror = mciSendCommandW(mwi->mci, wMsg,
1315 flags, (DWORD_PTR)&mci_seek);
1316 if (mwi->lasterror)
1317 {
1319 return mwi->lasterror;
1320 }
1321 /* update window to reflect the state */
1322 else InvalidateRect(hWnd, NULL, TRUE);
1323 return 0;
1324 }
1325
1326 case MCI_CLOSE:
1327 {
1328 RECT rc;
1329 MCI_GENERIC_PARMS mci_generic;
1330
1331 if (mwi->hdrv)
1332 {
1333 CloseDriver(mwi->hdrv, 0, 0);
1334 mwi->hdrv = 0;
1335 }
1336
1337 if (mwi->mci)
1338 {
1339 mci_generic.dwCallback = 0;
1341 0, (DWORD_PTR)&mci_generic);
1342 mwi->mci = 0;
1343 }
1344
1345 mwi->mode = MCI_MODE_NOT_READY;
1346 mwi->position = -1;
1347
1348 free(mwi->lpName);
1349 mwi->lpName = NULL;
1350 MCIWND_UpdateState(mwi);
1351
1352 GetClientRect(hWnd, &rc);
1353 rc.bottom = rc.top;
1354 if (!(mwi->dwStyle & MCIWNDF_NOPLAYBAR))
1355 rc.bottom += 32; /* add the height of the playbar */
1357 SetWindowPos(hWnd, 0, 0, 0, rc.right - rc.left,
1359
1361 return 0;
1362 }
1363
1364 case MCI_PAUSE:
1365 case MCI_STOP:
1366 case MCI_RESUME:
1367 mci_generic_command(mwi, wMsg);
1368 return mwi->lasterror;
1369
1370 case MCI_CONFIGURE:
1371 if (mwi->hdrv)
1373 return 0;
1374
1375 case MCI_BREAK:
1376 case MCI_CAPTURE:
1377 case MCI_COPY:
1378 case MCI_CUE:
1379 case MCI_CUT:
1380 case MCI_DELETE:
1381 case MCI_ESCAPE:
1382 case MCI_FREEZE:
1383 case MCI_GETDEVCAPS:
1384 /*case MCI_INDEX:*/
1385 case MCI_INFO:
1386 case MCI_LIST:
1387 case MCI_LOAD:
1388 /*case MCI_MARK:*/
1389 case MCI_MONITOR:
1390 case MCI_OPEN:
1391 case MCI_PASTE:
1392 case MCI_PUT:
1393 case MCI_QUALITY:
1394 case MCI_REALIZE:
1395 case MCI_RECORD:
1396 case MCI_RESERVE:
1397 case MCI_RESTORE:
1398 case MCI_SAVE:
1399 case MCI_SET:
1400 case MCI_SETAUDIO:
1401 /*case MCI_SETTIMECODE:*/
1402 /*case MCI_SETTUNER:*/
1403 case MCI_SETVIDEO:
1404 case MCI_SIGNAL:
1405 case MCI_SPIN:
1406 case MCI_STATUS:
1407 case MCI_SYSINFO:
1408 case MCI_UNDO:
1409 case MCI_UNFREEZE:
1410 case MCI_UPDATE:
1411 case MCI_WHERE:
1412 case MCI_WINDOW:
1413 FIXME("support for MCI_ command %04x not implemented\n", wMsg);
1414 return 0;
1415 }
1416
1417 if (wMsg >= WM_USER)
1418 {
1419 FIXME("support for MCIWNDM_ message WM_USER+%d not implemented\n", wMsg - WM_USER);
1420 return 0;
1421 }
1422
1424 return DefMDIChildProcW(hWnd, wMsg, wParam, lParam);
1425
1426 return DefWindowProcW(hWnd, wMsg, wParam, lParam);
1427}
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:20
#define HandleToLong(h)
Definition: basetsd.h:74
#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
static __inline const char * debugstr_an(const char *s, int n)
Definition: compat.h:55
HANDLE HWND
Definition: compat.h:19
#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
_ACRTIMP size_t __cdecl wcslen(const wchar_t *)
Definition: wcs.c:2988
static wchar_t * wcsdup(const wchar_t *str)
Definition: string.h:94
static LRESULT mci_get_devcaps(MCIWndInfo *mwi, UINT cap)
Definition: mciwnd.c:419
static void MCIWND_notify_size(MCIWndInfo *mwi)
Definition: mciwnd.c:171
static void MCIWND_notify_error(MCIWndInfo *mwi)
Definition: mciwnd.c:177
static LRESULT MCIWND_Create(HWND hWnd, LPCREATESTRUCTW cs)
Definition: mciwnd.c:251
static LRESULT MCIWND_Command(MCIWndInfo *mwi, WPARAM wParam, LPARAM lParam)
Definition: mciwnd.c:361
static LRESULT MCIWND_KeyDown(MCIWndInfo *mwi, UINT key)
Definition: mciwnd.c:433
static void MCIWND_notify_media(MCIWndInfo *mwi)
Definition: mciwnd.c:374
static MCIERROR mci_generic_command(MCIWndInfo *mwi, UINT cmd)
Definition: mciwnd.c:404
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
unsigned short WORD
Definition: ntddk_ex.h:93
unsigned long DWORD
Definition: ntddk_ex.h:95
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
LONG_PTR LRESULT
Definition: minwindef.h:176
#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:88
static const WCHAR stringW[]
Definition: reg.c:42
INT WINAPI MulDiv(INT nNumber, INT nNumerator, INT nDenominator)
Definition: muldiv.c:25
#define TBM_SETRANGEMIN
Definition: commctrl.h:2043
#define TBM_SETRANGEMAX
Definition: commctrl.h:2044
#define WM_PAINT
Definition: winuser.h:1648
#define SWP_NOACTIVATE
Definition: winuser.h:1253
#define GetWindowLongPtrW
Definition: winuser.h:4983
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:1636
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:1639
LONG WINAPI GetWindowLongW(_In_ HWND, _In_ int)
#define SWP_NOMOVE
Definition: winuser.h:1255
#define WM_COMMAND
Definition: winuser.h:1768
HCURSOR WINAPI SetCursor(_In_opt_ HCURSOR)
#define SWP_NOSIZE
Definition: winuser.h:1256
LRESULT WINAPI DefMDIChildProcW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
HCURSOR WINAPI LoadCursorW(_In_opt_ HINSTANCE, _In_ LPCWSTR)
Definition: cursoricon.c:2474
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:1716
#define WM_TIMER
Definition: winuser.h:1770
BOOL WINAPI EndPaint(_In_ HWND, _In_ const PAINTSTRUCT *)
#define MB_ICONEXCLAMATION
Definition: winuser.h:796
#define MB_OK
Definition: winuser.h:801
#define WM_USER
Definition: winuser.h:1923
#define IDC_WAIT
Definition: winuser.h:697
#define WM_DESTROY
Definition: winuser.h:1637
#define WM_KEYDOWN
Definition: winuser.h:1743
BOOL WINAPI InvalidateRect(_In_opt_ HWND, _In_opt_ LPCRECT, _In_ BOOL)
#define SWP_NOZORDER
Definition: winuser.h:1258
HDC WINAPI BeginPaint(_In_ HWND, _Out_ LPPAINTSTRUCT)
BOOL WINAPI KillTimer(_In_opt_ HWND, _In_ UINT_PTR)
#define GWL_STYLE
Definition: winuser.h:863
BOOL WINAPI DestroyWindow(_In_ HWND)
#define GWL_EXSTYLE
Definition: winuser.h:862
const WCHAR * str
WCHAR return_string[128]
Definition: mciwnd.c:59
SIZE size
Definition: mciwnd.c:53
int alias
Definition: mciwnd.c:49
UINT uTimer
Definition: mciwnd.c:57
HDRVR hdrv
Definition: mciwnd.c:48
UINT dev_type
Definition: mciwnd.c:50
Definition: dcommon.idl:28
long bottom
Definition: dcommon.idl:29
long right
Definition: dcommon.idl:29
long left
Definition: dcommon.idl:29
long top
Definition: dcommon.idl:29
LONG cx
Definition: kdterminal.h:27
LONG cy
Definition: kdterminal.h:28
LPCWSTR lpstrElementName
Definition: mmsystem.h:1534
LPCWSTR lpstrAlias
Definition: mmsystem.h:1535
MCIDEVICEID wDeviceID
Definition: mmsystem.h:1532
DWORD_PTR dwCallback
Definition: mmsystem.h:1539
DWORD_PTR dwCallback
Definition: mmsystem.h:1609
DWORD_PTR dwReturn
Definition: mmsystem.h:1569
#define DWORD_PTR
Definition: treelist.c:76
const char * LPCSTR
Definition: typedefs.h:52
const uint16_t * LPCWSTR
Definition: typedefs.h:57
uint16_t * LPWSTR
Definition: typedefs.h:56
char * LPSTR
Definition: typedefs.h:51
#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
HICON HCURSOR
Definition: windef.h:99

Referenced by MCIWndRegisterClass().

◆ MCIWndRegisterClass()

BOOL VFWAPIV MCIWndRegisterClass ( void  )

Definition at line 74 of file mciwnd.c.

75{
76 WNDCLASSW wc;
77
78 /* Since we are going to register a class belonging to MSVFW32
79 * and later we will create windows with a different hInstance
80 * CS_GLOBALCLASS is needed. And because the second attempt
81 * to register a global class will fail we need to test whether
82 * the class was already registered.
83 */
86 wc.cbClsExtra = 0;
87 wc.cbWndExtra = sizeof(MCIWndInfo*);
89 wc.hIcon = 0;
91 wc.hbrBackground = (HBRUSH)(COLOR_WINDOW + 1);
92 wc.lpszMenuName = NULL;
94
95 if (RegisterClassW(&wc)) return TRUE;
97
98 return FALSE;
99}
static LRESULT WINAPI MCIWndProc(HWND hWnd, UINT wMsg, WPARAM wParam, LPARAM lParam)
Definition: mciwnd.c:448
HMODULE MSVFW32_hModule
Definition: msvideo_main.c:103
#define CS_VREDRAW
Definition: winuser.h:666
#define COLOR_WINDOW
Definition: winuser.h:929
#define CS_HREDRAW
Definition: winuser.h:661
ATOM WINAPI RegisterClassW(_In_ CONST WNDCLASSW *)
#define IDC_ARROW
Definition: winuser.h:695
#define CS_DBLCLKS
Definition: winuser.h:659
#define CS_GLOBALCLASS
Definition: winuser.h:660
#define CS_OWNDC
Definition: winuser.h:663
LPCWSTR lpszClassName
Definition: winuser.h:3293
LPCWSTR lpszMenuName
Definition: winuser.h:3292
HBRUSH hbrBackground
Definition: winuser.h:3291
HICON hIcon
Definition: winuser.h:3289
HINSTANCE hInstance
Definition: winuser.h:3288
int cbClsExtra
Definition: winuser.h:3286
UINT style
Definition: winuser.h:3284
WNDPROC lpfnWndProc
Definition: winuser.h:3285
int cbWndExtra
Definition: winuser.h:3287
HCURSOR hCursor
Definition: winuser.h:3290
DWORD WINAPI GetLastError(void)
Definition: except.c:1042
#define ERROR_CLASS_ALREADY_EXISTS
Definition: winerror.h:1236

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 MCIWndCreateW(), and MCIWndRegisterClass().

◆ mciWndNameW

const WCHAR mciWndNameW[]
static
Initial value:
= {'M','C','I','W','n','d','C','r','e','a','t','e',
'W','i','n','e','I','n','t','e','r','n','a','l', 0}

Definition at line 41 of file mciwnd.c.

Referenced by MCIWND_Create(), and MCIWndCreateW().

◆ MSVFW32_hModule

HMODULE MSVFW32_hModule
extern

Definition at line 103 of file msvideo_main.c.

Referenced by MCIWndRegisterClass().