Commit 70161bc1 authored by Dmitry Timoshkov's avatar Dmitry Timoshkov Committed by Alexandre Julliard

msvideo: Add support for 16-bit MCIWndProc.

parent 303172e3
MODULE = msvideo.dll16
IMPORTS = msvfw32 version advapi32
IMPORTS = msvfw32 version advapi32 user32
EXTRADLLFLAGS = -m16 -Wb,--main-module,msvfw32.dll
......
......@@ -981,11 +981,31 @@ BOOL CDECL MCIWndRegisterClass16(void)
return MCIWndRegisterClass();
}
static LRESULT (WINAPI *pMCIWndProc)(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam);
static LRESULT WINAPI MCIWndProc16(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam)
{
switch (msg)
{
case MCIWNDM_SENDSTRINGA:
lparam = (ULONG_PTR)MapSL(lparam);
break;
default:
break;
}
return CallWindowProcA(pMCIWndProc, hwnd, msg, wparam, lparam);
}
/***********************************************************************
* MCIWndCreate(MSVIDEO.250)
*/
HWND16 CDECL MCIWndCreate16(HWND16 hwnd, HINSTANCE16 hinst16,
DWORD style, LPSTR file)
HWND16 CDECL MCIWndCreate16(HWND16 parent, HINSTANCE16 hinst16,
DWORD style, LPSTR file)
{
return HWND_16(MCIWndCreateA(HWND_32(hwnd), 0, style, file));
HWND hwnd = MCIWndCreateA(HWND_32(parent), 0, style, file);
if (hwnd)
pMCIWndProc = (void *)SetWindowLongPtrA(hwnd, GWLP_WNDPROC, (ULONG_PTR)MCIWndProc16);
return HWND_16(hwnd);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment