- Rename WIN_Handle16 to HWDN_16 and make it a macro.

- Prepare user.dll for the change of HWND to a void*.
This commit is contained in:
Michael Stefaniuc 2002-09-04 19:37:01 +00:00 committed by Alexandre Julliard
parent 65ea73fedf
commit 2247af320d
18 changed files with 110 additions and 105 deletions

View file

@ -32,6 +32,7 @@
#include "user.h"
#include "controls.h"
#include "wine/debug.h"
#include "win.h"
WINE_DEFAULT_DEBUG_CHANNEL(listbox);
WINE_DECLARE_DEBUG_CHANNEL(combo);
@ -106,7 +107,7 @@ typedef struct
#define SEND_NOTIFICATION(hwnd,descr,code) \
(SendMessageW( (descr)->owner, WM_COMMAND, \
MAKEWPARAM( GetWindowLongA((hwnd),GWL_ID), (code)), (hwnd) ))
MAKEWPARAM( GetWindowLongA((hwnd),GWL_ID), (code)), (LPARAM)(hwnd) ))
#define ISWIN31 (LOWORD(GetVersion()) == 0x0a03)
@ -2351,7 +2352,7 @@ static LRESULT LISTBOX_HandleChar( HWND hwnd, LB_DESCR *descr, WCHAR charW )
{
caret = SendMessageW( descr->owner, WM_CHARTOITEM,
MAKEWPARAM(charW, descr->focus_item),
hwnd );
(LPARAM)hwnd );
if (caret == -2) return 0;
}
if (caret == -1)
@ -3012,7 +3013,7 @@ static LRESULT WINAPI ListBoxWndProc_common( HWND hwnd, UINT msg,
LPDRAGINFO16 dragInfo = MapSL( lParam );
dragInfo->l = LISTBOX_GetItemFromPoint( descr, dragInfo->pt.x,
dragInfo->pt.y );
return SendMessage16( descr->owner, msg, wParam, lParam );
return SendMessage16( HWND_16(descr->owner), msg, wParam, lParam );
}
break;

View file

@ -417,7 +417,7 @@ static void STATIC_PaintOwnerDrawfn( HWND hwnd, HDC hdc, DWORD style )
dis.itemData = 0;
GetClientRect( hwnd, &dis.rcItem );
SendMessageW( GetParent(hwnd), WM_CTLCOLORSTATIC, hdc, hwnd );
SendMessageW( GetParent(hwnd), WM_CTLCOLORSTATIC, hdc, (LPARAM)hwnd );
SendMessageW( GetParent(hwnd), WM_DRAWITEM, id, (LPARAM)&dis );
}
@ -465,9 +465,11 @@ static void STATIC_PaintTextfn( HWND hwnd, HDC hdc, DWORD style )
if ((style & SS_NOPREFIX) || ((style & SS_TYPEMASK) != SS_SIMPLE))
{
hBrush = SendMessageW( GetParent(hwnd), WM_CTLCOLORSTATIC, hdc, hwnd );
hBrush = SendMessageW( GetParent(hwnd), WM_CTLCOLORSTATIC, hdc,
(LPARAM)hwnd );
if (!hBrush) /* did the app forget to call defwindowproc ? */
hBrush = DefWindowProcW(GetParent(hwnd), WM_CTLCOLORSTATIC, hdc, hwnd);
hBrush = DefWindowProcW(GetParent(hwnd), WM_CTLCOLORSTATIC, hdc,
(LPARAM)hwnd);
FillRect( hdc, &rc, hBrush );
}
if (!IsWindowEnabled(hwnd)) SetTextColor(hdc, GetSysColor(COLOR_GRAYTEXT));
@ -526,7 +528,7 @@ static void STATIC_PaintIconfn( HWND hwnd, HDC hdc, DWORD style )
HICON hIcon;
GetClientRect( hwnd, &rc );
hbrush = SendMessageW( GetParent(hwnd), WM_CTLCOLORSTATIC, hdc, hwnd );
hbrush = SendMessageW( GetParent(hwnd), WM_CTLCOLORSTATIC, hdc, (LPARAM)hwnd );
FillRect( hdc, &rc, hbrush );
if ((hIcon = GetWindowLongA( hwnd, HICON_GWL_OFFSET )))
DrawIcon( hdc, rc.left, rc.top, hIcon );
@ -541,7 +543,7 @@ static void STATIC_PaintBitmapfn(HWND hwnd, HDC hdc, DWORD style )
HBITMAP oldbitmap;
GetClientRect( hwnd, &rc );
hbrush = SendMessageW( GetParent(hwnd), WM_CTLCOLORSTATIC, hdc, hwnd );
hbrush = SendMessageW( GetParent(hwnd), WM_CTLCOLORSTATIC, hdc, (LPARAM)hwnd );
FillRect( hdc, &rc, hbrush );
if ((hIcon = GetWindowLongA( hwnd, HICON_GWL_OFFSET )))

View file

@ -355,7 +355,7 @@ static WDML_QUEUE_STATE WDML_HandleAdviseReply(WDML_CONV* pConv, MSG* msg, WDML_
UINT uiLo, uiHi;
HSZ hsz;
if (msg->message != WM_DDE_ACK || WIN_GetFullHandle(msg->wParam) != pConv->hwndServer)
if (msg->message != WM_DDE_ACK || WIN_GetFullHandle((HWND)msg->wParam) != pConv->hwndServer)
{
return WDML_QS_PASS;
}
@ -440,7 +440,7 @@ static WDML_QUEUE_STATE WDML_HandleUnadviseReply(WDML_CONV* pConv, MSG* msg, WDM
UINT uiLo, uiHi;
HSZ hsz;
if (msg->message != WM_DDE_ACK || WIN_GetFullHandle(msg->wParam) != pConv->hwndServer)
if (msg->message != WM_DDE_ACK || WIN_GetFullHandle((HWND)msg->wParam) != pConv->hwndServer)
{
return WDML_QS_PASS;
}
@ -512,7 +512,7 @@ static WDML_QUEUE_STATE WDML_HandleRequestReply(WDML_CONV* pConv, MSG* msg, WDML
UINT uiLo, uiHi;
HSZ hsz;
if (WIN_GetFullHandle(msg->wParam) != pConv->hwndServer)
if (WIN_GetFullHandle((HWND)msg->wParam) != pConv->hwndServer)
return WDML_QS_PASS;
switch (msg->message)
@ -674,7 +674,7 @@ static WDML_QUEUE_STATE WDML_HandleExecuteReply(WDML_CONV* pConv, MSG* msg, WDML
DDEACK ddeAck;
UINT uiLo, uiHi;
if (msg->message != WM_DDE_ACK || WIN_GetFullHandle(msg->wParam) != pConv->hwndServer)
if (msg->message != WM_DDE_ACK || WIN_GetFullHandle((HWND)msg->wParam) != pConv->hwndServer)
{
return WDML_QS_PASS;
}
@ -751,7 +751,7 @@ static WDML_QUEUE_STATE WDML_HandlePokeReply(WDML_CONV* pConv, MSG* msg, WDML_XA
UINT uiLo, uiHi;
HSZ hsz;
if (msg->message != WM_DDE_ACK && WIN_GetFullHandle(msg->wParam) != pConv->hwndServer)
if (msg->message != WM_DDE_ACK && WIN_GetFullHandle((HWND)msg->wParam) != pConv->hwndServer)
{
return WDML_QS_PASS;
}
@ -804,7 +804,7 @@ static WDML_QUEUE_STATE WDML_HandleTerminateReply(WDML_CONV* pConv, MSG* msg, WD
return WDML_QS_SWALLOWED;
}
if (WIN_GetFullHandle(msg->wParam) != pConv->hwndServer)
if (WIN_GetFullHandle((HWND)msg->wParam) != pConv->hwndServer)
{
FIXME("hmmm shouldn't happen\n");
return WDML_QS_PASS;
@ -891,7 +891,7 @@ static WDML_QUEUE_STATE WDML_HandleIncomingData(WDML_CONV* pConv, MSG* msg, HDDE
*/
static WDML_QUEUE_STATE WDML_HandleIncomingTerminate(WDML_CONV* pConv, MSG* msg, HDDEDATA* hdd)
{
if (pConv->hwndServer != WIN_GetFullHandle(msg->wParam))
if (pConv->hwndServer != WIN_GetFullHandle((HWND)msg->wParam))
return WDML_QS_PASS;
pConv->wStatus |= ST_TERMINATED;

View file

@ -166,7 +166,7 @@ BOOL16 WINAPI PeekMessage32_16( MSG32_16 *msg16, HWND16 hwnd16,
MsgWaitForMultipleObjectsEx( 0, NULL, 1, 0, MWMO_ALERTABLE );
if (!PeekMessageW( &msg, hwnd, first, last, flags )) return FALSE;
msg16->msg.hwnd = WIN_Handle16( msg.hwnd );
msg16->msg.hwnd = HWND_16( msg.hwnd );
msg16->msg.lParam = msg.lParam;
msg16->msg.time = msg.time;
msg16->msg.pt.x = (INT16)msg.pt.x;
@ -203,7 +203,7 @@ BOOL16 WINAPI GetMessage32_16( MSG32_16 *msg16, HWND16 hwnd16, UINT16 first,
if(USER16_AlertableWait)
MsgWaitForMultipleObjectsEx( 0, NULL, INFINITE, 0, MWMO_ALERTABLE );
GetMessageW( &msg, hwnd, first, last );
msg16->msg.hwnd = WIN_Handle16( msg.hwnd );
msg16->msg.hwnd = HWND_16( msg.hwnd );
msg16->msg.lParam = msg.lParam;
msg16->msg.time = msg.time;
msg16->msg.pt.x = (INT16)msg.pt.x;
@ -281,14 +281,14 @@ LONG WINAPI DispatchMessage16( const MSG16* msg )
}
}
if (!(wndPtr = WIN_GetPtr( msg->hwnd )))
if (!(wndPtr = WIN_GetPtr( HWND_32(msg->hwnd) )))
{
if (msg->hwnd) SetLastError( ERROR_INVALID_WINDOW_HANDLE );
return 0;
}
if (wndPtr == WND_OTHER_PROCESS)
{
if (IsWindow( msg->hwnd ))
if (IsWindow16( msg->hwnd ))
ERR( "cannot dispatch msg to other process window %x\n", msg->hwnd );
SetLastError( ERROR_INVALID_WINDOW_HANDLE );
return 0;

View file

@ -24,6 +24,7 @@
#include "wingdi.h"
#include "wine/winuser16.h"
#include "wine/server.h"
#include "win.h"
/* size of buffer needed to store an atom string */
#define ATOM_BUFFER_SIZE 256
@ -298,7 +299,7 @@ INT WINAPI EnumPropsExW(HWND hwnd, PROPENUMPROCEXW func, LPARAM lParam)
INT16 WINAPI EnumProps16( HWND16 hwnd, PROPENUMPROC16 func )
{
int ret = -1, i, count;
property_data_t *list = get_properties( hwnd, &count );
property_data_t *list = get_properties( HWND_32(hwnd), &count );
if (list)
{

View file

@ -40,7 +40,7 @@ struct wnd_enum_info
static BOOL CALLBACK wnd_enum_callback( HWND hwnd, LPARAM param )
{
const struct wnd_enum_info *info = (struct wnd_enum_info *)param;
return WIN_CallTo16_word_wl( info->proc, hwnd, info->param );
return WIN_CallTo16_word_wl( info->proc, HWND_16(hwnd), info->param );
}
/* convert insert after window handle to 32-bit */
@ -74,7 +74,7 @@ BOOL16 WINAPI KillTimer16( HWND16 hwnd, UINT16 id )
*/
HWND16 WINAPI SetCapture16( HWND16 hwnd )
{
return WIN_Handle16( SetCapture( WIN_Handle32(hwnd) ));
return HWND_16( SetCapture( WIN_Handle32(hwnd) ));
}
@ -92,7 +92,7 @@ BOOL16 WINAPI ReleaseCapture16(void)
*/
HWND16 WINAPI SetFocus16( HWND16 hwnd )
{
return WIN_Handle16( SetFocus( WIN_Handle32(hwnd) ));
return HWND_16( SetFocus( WIN_Handle32(hwnd) ));
}
@ -101,7 +101,7 @@ HWND16 WINAPI SetFocus16( HWND16 hwnd )
*/
HWND16 WINAPI GetFocus16(void)
{
return WIN_Handle16( GetFocus() );
return HWND_16( GetFocus() );
}
@ -158,7 +158,7 @@ HWND16 WINAPI WindowFromPoint16( POINT16 pt )
POINT pt32;
CONV_POINT16TO32( &pt, &pt32 );
return WIN_Handle16( WindowFromPoint( pt32 ) );
return HWND_16( WindowFromPoint( pt32 ) );
}
@ -319,7 +319,7 @@ BOOL16 WINAPI BringWindowToTop16( HWND16 hwnd )
*/
HWND16 WINAPI GetParent16( HWND16 hwnd )
{
return WIN_Handle16( GetParent( WIN_Handle32(hwnd) ));
return HWND_16( GetParent( WIN_Handle32(hwnd) ));
}
@ -357,7 +357,7 @@ BOOL16 WINAPI IsWindowVisible16( HWND16 hwnd )
*/
HWND16 WINAPI FindWindow16( LPCSTR className, LPCSTR title )
{
return WIN_Handle16( FindWindowA( className, title ));
return HWND_16( FindWindowA( className, title ));
}
@ -419,7 +419,7 @@ INT16 WINAPI GetClassName16( HWND16 hwnd, LPSTR buffer, INT16 count )
*/
HWND16 WINAPI SetActiveWindow16( HWND16 hwnd )
{
return WIN_Handle16( SetActiveWindow( WIN_Handle32(hwnd) ));
return HWND_16( SetActiveWindow( WIN_Handle32(hwnd) ));
}
@ -428,7 +428,7 @@ HWND16 WINAPI SetActiveWindow16( HWND16 hwnd )
*/
HWND16 WINAPI GetActiveWindow16(void)
{
return WIN_Handle16( GetActiveWindow() );
return HWND_16( GetActiveWindow() );
}
@ -530,7 +530,7 @@ BOOL16 WINAPI EndDialog16( HWND16 hwnd, INT16 retval )
*/
HWND16 WINAPI GetDlgItem16( HWND16 hwndDlg, INT16 id )
{
return WIN_Handle16( GetDlgItem( WIN_Handle32(hwndDlg), (UINT16) id ));
return HWND_16( GetDlgItem( WIN_Handle32(hwndDlg), (UINT16) id ));
}
@ -679,7 +679,7 @@ BOOL16 WINAPI FlashWindow16( HWND16 hwnd, BOOL16 bInvert )
*/
HWND16 WINAPI WindowFromDC16( HDC16 hDC )
{
return WIN_Handle16( WindowFromDC( hDC ) );
return HWND_16( WindowFromDC( hDC ) );
}
@ -778,7 +778,7 @@ BOOL16 WINAPI OpenClipboard16( HWND16 hwnd )
*/
HWND16 WINAPI GetClipboardOwner16(void)
{
return WIN_Handle16( GetClipboardOwner() );
return HWND_16( GetClipboardOwner() );
}
@ -787,7 +787,7 @@ HWND16 WINAPI GetClipboardOwner16(void)
*/
HWND16 WINAPI SetClipboardViewer16( HWND16 hwnd )
{
return WIN_Handle16( SetClipboardViewer( WIN_Handle32(hwnd) ));
return HWND_16( SetClipboardViewer( WIN_Handle32(hwnd) ));
}
@ -796,7 +796,7 @@ HWND16 WINAPI SetClipboardViewer16( HWND16 hwnd )
*/
HWND16 WINAPI GetClipboardViewer16(void)
{
return WIN_Handle16( GetClipboardViewer() );
return HWND_16( GetClipboardViewer() );
}
@ -950,7 +950,7 @@ HWND16 WINAPI ChildWindowFromPoint16( HWND16 hwndParent, POINT16 pt )
{
POINT pt32;
CONV_POINT16TO32( &pt, &pt32 );
return WIN_Handle16( ChildWindowFromPoint( WIN_Handle32(hwndParent), pt32 ));
return HWND_16( ChildWindowFromPoint( WIN_Handle32(hwndParent), pt32 ));
}
@ -994,7 +994,7 @@ BOOL16 WINAPI EnumTaskWindows16( HTASK16 hTask, WNDENUMPROC16 func, LPARAM lPara
HWND16 WINAPI GetNextDlgGroupItem16( HWND16 hwndDlg, HWND16 hwndCtrl,
BOOL16 fPrevious )
{
return WIN_Handle16( GetNextDlgGroupItem( WIN_Handle32(hwndDlg),
return HWND_16( GetNextDlgGroupItem( WIN_Handle32(hwndDlg),
WIN_Handle32(hwndCtrl), fPrevious ));
}
@ -1005,7 +1005,7 @@ HWND16 WINAPI GetNextDlgGroupItem16( HWND16 hwndDlg, HWND16 hwndCtrl,
HWND16 WINAPI GetNextDlgTabItem16( HWND16 hwndDlg, HWND16 hwndCtrl,
BOOL16 fPrevious )
{
return WIN_Handle16( GetNextDlgTabItem( WIN_Handle32(hwndDlg),
return HWND_16( GetNextDlgTabItem( WIN_Handle32(hwndDlg),
WIN_Handle32(hwndCtrl), fPrevious ));
}
@ -1015,7 +1015,7 @@ HWND16 WINAPI GetNextDlgTabItem16( HWND16 hwndDlg, HWND16 hwndCtrl,
*/
HWND16 WINAPI GetTopWindow16( HWND16 hwnd )
{
return WIN_Handle16( GetTopWindow( WIN_Handle32(hwnd) ));
return HWND_16( GetTopWindow( WIN_Handle32(hwnd) ));
}
@ -1045,7 +1045,7 @@ BOOL16 WINAPI SetWindowPos16( HWND16 hwnd, HWND16 hwndInsertAfter,
*/
HWND16 WINAPI SetParent16( HWND16 hwndChild, HWND16 hwndNewParent )
{
return WIN_Handle16( SetParent( WIN_Handle32(hwndChild), WIN_Handle32(hwndNewParent) ));
return HWND_16( SetParent( WIN_Handle32(hwndChild), WIN_Handle32(hwndNewParent) ));
}
@ -1054,7 +1054,7 @@ HWND16 WINAPI SetParent16( HWND16 hwndChild, HWND16 hwndNewParent )
*/
HWND16 WINAPI GetCapture16(void)
{
return WIN_Handle16( GetCapture() );
return HWND_16( GetCapture() );
}
@ -1081,7 +1081,7 @@ INT16 WINAPI ExcludeUpdateRgn16( HDC16 hdc, HWND16 hwnd )
*/
HWND16 WINAPI GetOpenClipboardWindow16(void)
{
return WIN_Handle16( GetOpenClipboardWindow() );
return HWND_16( GetOpenClipboardWindow() );
}
@ -1120,7 +1120,7 @@ BOOL16 WINAPI EndDeferWindowPos16( HDWP16 hdwp )
*/
HWND16 WINAPI GetWindow16( HWND16 hwnd, WORD rel )
{
return WIN_Handle16( GetWindow( WIN_Handle32(hwnd), rel ) );
return HWND_16( GetWindow( WIN_Handle32(hwnd), rel ) );
}
@ -1186,7 +1186,7 @@ BOOL16 WINAPI SetSystemMenu16( HWND16 hwnd, HMENU16 hMenu )
*/
HWND16 WINAPI GetDesktopWindow16(void)
{
return WIN_Handle16( GetDesktopWindow() );
return HWND_16( GetDesktopWindow() );
}
@ -1195,7 +1195,7 @@ HWND16 WINAPI GetDesktopWindow16(void)
*/
HWND16 WINAPI GetLastActivePopup16( HWND16 hwnd )
{
return WIN_Handle16( GetLastActivePopup( WIN_Handle32(hwnd) ));
return HWND_16( GetLastActivePopup( WIN_Handle32(hwnd) ));
}
@ -1353,7 +1353,7 @@ HWND16 WINAPI ChildWindowFromPointEx16( HWND16 hwndParent, POINT16 pt, UINT16 uF
{
POINT pt32;
CONV_POINT16TO32( &pt, &pt32 );
return WIN_Handle16( ChildWindowFromPointEx( WIN_Handle32(hwndParent), pt32, uFlags ));
return HWND_16( ChildWindowFromPointEx( WIN_Handle32(hwndParent), pt32, uFlags ));
}
@ -1407,7 +1407,7 @@ BOOL16 WINAPI DlgDirSelectComboBoxEx16( HWND16 hwnd, LPSTR str, INT16 len,
*/
HWND16 WINAPI FindWindowEx16( HWND16 parent, HWND16 child, LPCSTR className, LPCSTR title )
{
return WIN_Handle16( FindWindowExA( WIN_Handle32(parent), WIN_Handle32(child),
return HWND_16( FindWindowExA( WIN_Handle32(parent), WIN_Handle32(child),
className, title ));
}
@ -1517,7 +1517,7 @@ BOOL16 WINAPI EnableScrollBar16( HWND16 hwnd, INT16 nBar, UINT16 flags )
*/
HWND16 WINAPI GetShellWindow16(void)
{
return WIN_Handle16( GetShellWindow() );
return HWND_16( GetShellWindow() );
}
@ -1526,7 +1526,7 @@ HWND16 WINAPI GetShellWindow16(void)
*/
HWND16 WINAPI GetForegroundWindow16(void)
{
return WIN_Handle16( GetForegroundWindow() );
return HWND_16( GetForegroundWindow() );
}

View file

@ -143,7 +143,7 @@ static DWORD PASCAL X11DRV_XF86DGA2_SetMode(LPDDHAL_SETMODEDATA data)
KeyPressMask|KeyReleaseMask|
ButtonPressMask|ButtonReleaseMask|
PointerMotionMask);
X11DRV_EVENT_SetDGAStatus(ddlocal->hWnd, dga_event);
X11DRV_EVENT_SetDGAStatus((HWND)ddlocal->hWnd, dga_event);
X11DRV_EVENT_SetInputMethod(X11DRV_INPUT_RELATIVE);
}
dga_dev = new_dev;

View file

@ -1058,7 +1058,7 @@ static void EVENT_DropFromOffiX( HWND hWnd, XClientMessageEvent *event )
&x, &y, (int *) &u.pt_aux.x, (int *) &u.pt_aux.y,
(unsigned int*)&aux_long);
lpDragInfo->hScope = hWnd;
lpDragInfo->hScope = HWND_16(hWnd);
lpDragInfo->pt.x = (INT16)x; lpDragInfo->pt.y = (INT16)y;
/* find out drop point and drop window */
@ -1110,7 +1110,7 @@ static void EVENT_DropFromOffiX( HWND hWnd, XClientMessageEvent *event )
if( lpDrop )
{
WND *pDropWnd = WIN_FindWndPtr( lpDragInfo->hScope );
WND *pDropWnd = WIN_FindWndPtr( HWND_32(lpDragInfo->hScope) );
lpDrop->pFiles = sizeof(DROPFILES);
lpDrop->pt.x = x;
lpDrop->pt.y = y;

View file

@ -121,10 +121,8 @@ inline static HWND WIN_GetFullHandle( HWND hwnd )
return hwnd;
}
inline static HWND16 WIN_Handle16( HWND hwnd )
{
return LOWORD(hwnd);
}
#define HWND_16(hwnd32) (LOWORD(hwnd32))
#define HWND_32(hwnd16) ((HWND)(ULONG_PTR)(hwnd16))
inline static WND *WIN_FindWndPtr16( HWND16 hwnd )
{

View file

@ -452,7 +452,7 @@ static BOOL DIALOG_CreateControls( HWND hwnd, LPCSTR template, const DLG_TEMPLAT
MulDiv(info.y, dlgInfo->yBaseUnit, 8),
MulDiv(info.cx, dlgInfo->xBaseUnit, 4),
MulDiv(info.cy, dlgInfo->yBaseUnit, 8),
WIN_Handle16(hwnd), (HMENU16)info.id,
HWND_16(hwnd), (HMENU16)info.id,
instance, (LPVOID)segptr ));
UnMapLS( segptr );
}
@ -812,7 +812,7 @@ static HWND DIALOG_CreateIndirect( HINSTANCE hInst, LPCSTR dlgTemplate,
hwnd = WIN_Handle32( CreateWindowEx16(template.exStyle, template.className,
template.caption, template.style & ~WS_VISIBLE,
rect.left, rect.top, rect.right, rect.bottom,
WIN_Handle16(owner), dlgInfo->hMenu, hInst, NULL ));
HWND_16(owner), dlgInfo->hMenu, hInst, NULL ));
else
hwnd = CreateWindowExW(template.exStyle, (LPCWSTR)template.className,
(LPCWSTR)template.caption,
@ -836,7 +836,7 @@ static HWND DIALOG_CreateIndirect( HINSTANCE hInst, LPCSTR dlgTemplate,
SetWindowLongW( hwnd, DWL_WINE_DIALOGINFO, (LONG)dlgInfo );
switch(procType)
{
case WIN_PROC_16: SetWindowLong16( WIN_Handle16(hwnd), DWL_DLGPROC, (LONG)dlgProc ); break;
case WIN_PROC_16: SetWindowLong16( HWND_16(hwnd), DWL_DLGPROC, (LONG)dlgProc ); break;
case WIN_PROC_32A: SetWindowLongA( hwnd, DWL_DLGPROC, (LONG)dlgProc ); break;
case WIN_PROC_32W: SetWindowLongW( hwnd, DWL_DLGPROC, (LONG)dlgProc ); break;
default: break;
@ -973,7 +973,7 @@ HWND16 WINAPI CreateDialogIndirectParam16( HINSTANCE16 hInst,
HWND16 owner, DLGPROC16 dlgProc,
LPARAM param )
{
return WIN_Handle16( DIALOG_CreateIndirect( hInst, dlgTemplate, WIN_Handle32(owner),
return HWND_16( DIALOG_CreateIndirect( hInst, dlgTemplate, WIN_Handle32(owner),
(DLGPROC)dlgProc, param, WIN_PROC_16, FALSE ));
}

View file

@ -189,7 +189,7 @@ static LRESULT call_hook_16_to_32( HOOKPROC proc, INT id, INT code, WPARAM wpara
cs32.lpszClass = MapSL( cs16->lpszClass );
ret = proc( code, wparam, (LPARAM)&cbtcw32 );
}
cbtcw16->hwndInsertAfter = WIN_Handle16( cbtcw32.hwndInsertAfter );
cbtcw16->hwndInsertAfter = HWND_16( cbtcw32.hwndInsertAfter );
break;
}
case HCBT_ACTIVATE:
@ -338,7 +338,7 @@ static LRESULT call_hook_32_to_16( HOOKPROC16 proc, INT id, INT code, WPARAM wpa
CWPSTRUCT16 cwp16;
MSGPARAM16 mp16;
cwp16.hwnd = WIN_Handle16(cwp32->hwnd);
cwp16.hwnd = HWND_16(cwp32->hwnd);
cwp16.lParam = cwp32->lParam;
if (unicode)
@ -375,7 +375,7 @@ static LRESULT call_hook_32_to_16( HOOKPROC16 proc, INT id, INT code, WPARAM wpa
STRUCT32_CREATESTRUCT32Ato16( cbtcw32->lpcs, &cs16 );
cbtcw16.lpcs = (CREATESTRUCT16 *)MapLS( &cs16 );
cbtcw16.hwndInsertAfter = WIN_Handle16( cbtcw32->hwndInsertAfter );
cbtcw16.hwndInsertAfter = HWND_16( cbtcw32->hwndInsertAfter );
lparam = MapLS( &cbtcw16 );
if (unicode)
@ -406,7 +406,7 @@ static LRESULT call_hook_32_to_16( HOOKPROC16 proc, INT id, INT code, WPARAM wpa
CBTACTIVATESTRUCT16 cas16;
cas16.fMouse = cas32->fMouse;
cas16.hWndActive = WIN_Handle16( cas32->hWndActive );
cas16.hWndActive = HWND_16( cas32->hWndActive );
lparam = MapLS( &cas16 );
ret = call_hook_16( proc, id, code, wparam, lparam );
@ -420,7 +420,7 @@ static LRESULT call_hook_32_to_16( HOOKPROC16 proc, INT id, INT code, WPARAM wpa
ms16.pt.x = ms32->pt.x;
ms16.pt.y = ms32->pt.y;
ms16.hwnd = WIN_Handle16( ms32->hwnd );
ms16.hwnd = HWND_16( ms32->hwnd );
ms16.wHitTestCode = ms32->wHitTestCode;
ms16.dwExtraInfo = ms32->dwExtraInfo;
@ -450,7 +450,7 @@ static LRESULT call_hook_32_to_16( HOOKPROC16 proc, INT id, INT code, WPARAM wpa
ms16.pt.x = ms32->pt.x;
ms16.pt.y = ms32->pt.y;
ms16.hwnd = WIN_Handle16( ms32->hwnd );
ms16.hwnd = HWND_16( ms32->hwnd );
ms16.wHitTestCode = ms32->wHitTestCode;
ms16.dwExtraInfo = ms32->dwExtraInfo;
@ -1099,7 +1099,7 @@ BOOL16 WINAPI CallMsgFilter32_16( SEGPTR msg16_32, INT16 code, BOOL16 wHaveParam
ret = (BOOL16)CallMsgFilterA(&msg32, (INT)code);
lpmsg16_32->msg.hwnd = WIN_Handle16( msg32.hwnd );
lpmsg16_32->msg.hwnd = HWND_16( msg32.hwnd );
lpmsg16_32->msg.message = msg32.message;
lpmsg16_32->msg.wParam = LOWORD(msg32.wParam);
lpmsg16_32->msg.lParam = msg32.lParam;

View file

@ -566,7 +566,7 @@ static HWND MDICreateChild( HWND parent, MDICLIENTINFO *ci,
seg_cs16 = MapLS( &cs16 );
hwnd = WIN_Handle32( CreateWindow16( cs->szClass, cs->szTitle, style,
cs16.x, cs16.y, cs16.cx, cs16.cy,
WIN_Handle16(parent), (HMENU)wIDmenu,
HWND_16(parent), (HMENU)wIDmenu,
cs16.hOwner, (LPVOID)seg_cs16 ));
UnMapLS( seg_cs16 );
UnMapLS( title );
@ -1447,7 +1447,7 @@ LRESULT WINAPI DefFrameProc16( HWND16 hwnd, HWND16 hwndMDIClient,
MDINEXTMENU next_menu;
DefFrameProcW( WIN_Handle32(hwnd), WIN_Handle32(hwndMDIClient),
message, wParam, (LPARAM)&next_menu );
return MAKELONG( next_menu.hmenuNext, WIN_Handle16(next_menu.hwndNext) );
return MAKELONG( next_menu.hmenuNext, HWND_16(next_menu.hwndNext) );
}
default:
return DefWindowProc16(hwnd, message, wParam, lParam);
@ -1614,7 +1614,7 @@ LRESULT WINAPI DefMDIChildProc16( HWND16 hwnd, UINT16 message,
{
MDINEXTMENU next_menu;
DefMDIChildProcW( WIN_Handle32(hwnd), message, wParam, (LPARAM)&next_menu );
return MAKELONG( next_menu.hmenuNext, WIN_Handle16(next_menu.hwndNext) );
return MAKELONG( next_menu.hmenuNext, HWND_16(next_menu.hwndNext) );
}
default:
return DefWindowProc16(hwnd, message, wParam, lParam);

View file

@ -499,7 +499,8 @@ static BOOL process_cooked_mouse_message( MSG *msg, ULONG_PTR extra_info, BOOL r
if ((hittest == HTERROR) || (hittest == HTNOWHERE))
{
SendMessageA( msg->hwnd, WM_SETCURSOR, msg->hwnd, MAKELONG( hittest, raw_message ));
SendMessageA( msg->hwnd, WM_SETCURSOR, (WPARAM)msg->hwnd,
MAKELONG( hittest, raw_message ));
return FALSE;
}
@ -523,7 +524,7 @@ static BOOL process_cooked_mouse_message( MSG *msg, ULONG_PTR extra_info, BOOL r
if (msg->hwnd != GetActiveWindow() && hwndTop != GetDesktopWindow())
{
LONG ret = SendMessageA( msg->hwnd, WM_MOUSEACTIVATE, hwndTop,
LONG ret = SendMessageA( msg->hwnd, WM_MOUSEACTIVATE, (WPARAM)hwndTop,
MAKELONG( hittest, raw_message ) );
switch(ret)
@ -555,7 +556,8 @@ static BOOL process_cooked_mouse_message( MSG *msg, ULONG_PTR extra_info, BOOL r
/* Windows sends the normal mouse message as the message parameter
in the WM_SETCURSOR message even if it's non-client mouse message */
SendMessageA( msg->hwnd, WM_SETCURSOR, msg->hwnd, MAKELONG( hittest, raw_message ));
SendMessageA( msg->hwnd, WM_SETCURSOR, (WPARAM)msg->hwnd,
MAKELONG( hittest, raw_message ));
return !eatMsg;
}

View file

@ -2256,7 +2256,7 @@ void SPY_EnterMessage( INT iFlag, HWND hWnd, UINT msg,
{
case SPY_DISPATCHMESSAGE16:
TRACE("%*s(%04x) %-16s message [%04x] %s dispatched wp=%04x lp=%08lx\n",
indent, "", WIN_Handle16(hWnd),
indent, "", HWND_16(hWnd),
debugstr_w(sp_e.wnd_name), msg, sp_e.msg_name, wParam, lParam);
break;
@ -2270,7 +2270,7 @@ void SPY_EnterMessage( INT iFlag, HWND hWnd, UINT msg,
case SPY_SENDMESSAGE:
{
char taskName[30];
HTASK16 hTask = GetWindowTask16( WIN_Handle16(hWnd) );
HTASK16 hTask = GetWindowTask16( HWND_16(hWnd) );
if (hTask == GetCurrentTask()) strcpy( taskName, "self" );
else if (!hTask) strcpy( taskName, "Wine" );
@ -2282,7 +2282,7 @@ void SPY_EnterMessage( INT iFlag, HWND hWnd, UINT msg,
if (iFlag == SPY_SENDMESSAGE16)
TRACE("%*s(%04x) %-16s message [%04x] %s sent from %s wp=%04x lp=%08lx\n",
indent, "", WIN_Handle16(hWnd), debugstr_w(sp_e.wnd_name), msg,
indent, "", HWND_16(hWnd), debugstr_w(sp_e.wnd_name), msg,
sp_e.msg_name, taskName, wParam, lParam );
else
{ TRACE("%*s(%08x) %-16s message [%04x] %s sent from %s wp=%08x lp=%08lx\n",
@ -2296,7 +2296,7 @@ void SPY_EnterMessage( INT iFlag, HWND hWnd, UINT msg,
case SPY_DEFWNDPROC16:
if( SPY_ExcludeDWP ) return;
TRACE("%*s(%04x) DefWindowProc16: %s [%04x] wp=%04x lp=%08lx\n",
indent, "", WIN_Handle16(hWnd), sp_e.msg_name, msg, wParam, lParam );
indent, "", HWND_16(hWnd), sp_e.msg_name, msg, wParam, lParam );
break;
case SPY_DEFWNDPROC:
@ -2340,7 +2340,7 @@ void SPY_ExitMessage( INT iFlag, HWND hWnd, UINT msg, LRESULT lReturn,
{
case SPY_RESULT_DEFWND16:
TRACE(" %*s(%04x) DefWindowProc16: %s [%04x] returned %08lx\n",
indent, "", WIN_Handle16(hWnd), sp_e.msg_name, msg, lReturn );
indent, "", HWND_16(hWnd), sp_e.msg_name, msg, lReturn );
break;
case SPY_RESULT_DEFWND:
@ -2350,7 +2350,7 @@ void SPY_ExitMessage( INT iFlag, HWND hWnd, UINT msg, LRESULT lReturn,
case SPY_RESULT_OK16:
TRACE(" %*s(%04x) %-16s message [%04x] %s returned %08lx\n",
indent, "", WIN_Handle16(hWnd), debugstr_w(sp_e.wnd_name), msg,
indent, "", HWND_16(hWnd), debugstr_w(sp_e.wnd_name), msg,
sp_e.msg_name, lReturn );
break;
@ -2363,7 +2363,7 @@ void SPY_ExitMessage( INT iFlag, HWND hWnd, UINT msg, LRESULT lReturn,
case SPY_RESULT_INVALIDHWND16:
WARN(" %*s(%04x) %-16s message [%04x] %s HAS INVALID HWND\n",
indent, "", WIN_Handle16(hWnd), debugstr_w(sp_e.wnd_name), msg, sp_e.msg_name );
indent, "", HWND_16(hWnd), debugstr_w(sp_e.wnd_name), msg, sp_e.msg_name );
break;
case SPY_RESULT_INVALIDHWND:

View file

@ -35,7 +35,7 @@ void STRUCT32_MSG16to32(const MSG16 *msg16,MSG *msg32)
void STRUCT32_MSG32to16(const MSG *msg32,MSG16 *msg16)
{
msg16->hwnd = WIN_Handle16(msg32->hwnd);
msg16->hwnd = HWND_16(msg32->hwnd);
msg16->message=msg32->message;
msg16->wParam=msg32->wParam;
msg16->lParam=msg32->lParam;
@ -64,8 +64,8 @@ void STRUCT32_MINMAXINFO16to32( const MINMAXINFO16 *from, MINMAXINFO *to )
void STRUCT32_WINDOWPOS32to16( const WINDOWPOS* from, WINDOWPOS16* to )
{
to->hwnd = WIN_Handle16(from->hwnd);
to->hwndInsertAfter = WIN_Handle16(from->hwndInsertAfter);
to->hwnd = HWND_16(from->hwnd);
to->hwndInsertAfter = HWND_16(from->hwndInsertAfter);
to->x = from->x;
to->y = from->y;
to->cx = from->cx;
@ -92,7 +92,7 @@ void STRUCT32_CREATESTRUCT32Ato16( const CREATESTRUCTA* from,
to->lpCreateParams = from->lpCreateParams;
to->hInstance = (HINSTANCE16)from->hInstance;
to->hMenu = (HMENU16)from->hMenu;
to->hwndParent = WIN_Handle16(from->hwndParent);
to->hwndParent = HWND_16(from->hwndParent);
to->cy = from->cy;
to->cx = from->cx;
to->y = from->y;

View file

@ -1254,7 +1254,7 @@ HWND16 WINAPI CreateWindowEx16( DWORD exStyle, LPCSTR className,
cs.lpszClass = className;
cs.dwExStyle = exStyle;
return WIN_Handle16( WIN_CreateWindowEx( &cs, classAtom, WIN_PROC_16 ));
return HWND_16( WIN_CreateWindowEx( &cs, classAtom, WIN_PROC_16 ));
}
@ -2528,7 +2528,7 @@ HWND WINAPI SetParent( HWND hwnd, HWND parent )
}
if (!(full_handle = WIN_IsCurrentThread( hwnd )))
return SendMessageW( hwnd, WM_WINE_SETPARENT, (WPARAM)parent, 0 );
return (HWND)SendMessageW( hwnd, WM_WINE_SETPARENT, (WPARAM)parent, 0 );
hwnd = full_handle;
@ -3167,12 +3167,13 @@ BOOL16 DRAG_QueryUpdate( HWND hQueryWnd, SEGPTR spDragInfo, BOOL bNoSend )
}
else wParam = 1;
ScreenToClient16(hQueryWnd,&ptrDragInfo->pt);
ScreenToClient16(HWND_16(hQueryWnd),&ptrDragInfo->pt);
ptrDragInfo->hScope = hQueryWnd;
ptrDragInfo->hScope = HWND_16(hQueryWnd);
if (bNoSend) bResult = (GetWindowLongA( hQueryWnd, GWL_EXSTYLE ) & WS_EX_ACCEPTFILES) != 0;
else bResult = SendMessage16( hQueryWnd, WM_QUERYDROPOBJECT, (WPARAM16)wParam, spDragInfo );
else bResult = SendMessage16( HWND_16(hQueryWnd), WM_QUERYDROPOBJECT,
(WPARAM16)wParam, spDragInfo );
if( !bResult ) CONV_POINT32TO16( &pt, &ptrDragInfo->pt );
@ -3256,7 +3257,7 @@ DWORD WINAPI DragObject16( HWND16 hwndScope, HWND16 hWnd, UINT16 wObj,
lpDragInfo->hOfStruct = hOfStruct;
lpDragInfo->l = 0L;
SetCapture(hWnd);
SetCapture(WIN_Handle32(hWnd));
ShowCursor( TRUE );
do
@ -3271,7 +3272,7 @@ DWORD WINAPI DragObject16( HWND16 hwndScope, HWND16 hWnd, UINT16 wObj,
/* update DRAGINFO struct */
TRACE_(msg)("lpDI->hScope = %04x\n",lpDragInfo->hScope);
if( DRAG_QueryUpdate(hwndScope, spDragInfo, FALSE) > 0 )
if( DRAG_QueryUpdate(WIN_Handle32(hwndScope), spDragInfo, FALSE) > 0 )
hCurrentCursor = hCursor;
else
{

View file

@ -156,7 +156,7 @@ BOOL WINAPI WinHelpA( HWND hWnd, LPCSTR lpHelpFile, UINT wCommand,
} else
lpwh->ofsData = 0;
GlobalUnlock16(hwh);
return SendMessage16(hDest,WM_WINHELP,hWnd,hwh);
return SendMessage16(HWND_16(hDest),WM_WINHELP,HWND_16(hWnd),hwh);
}

View file

@ -1364,7 +1364,7 @@ INT WINPROC_MapMsg16To32A( HWND hwnd, UINT16 msg16, WPARAM16 wParam16, UINT *pms
case WM_DDE_TERMINATE:
case WM_DDE_UNADVISE:
case WM_DDE_REQUEST:
*pwparam32 = WIN_Handle32(wParam16);
*pwparam32 = (WPARAM)WIN_Handle32(wParam16);
return 0;
case WM_DDE_ADVISE:
case WM_DDE_DATA:
@ -1374,7 +1374,7 @@ INT WINPROC_MapMsg16To32A( HWND hwnd, UINT16 msg16, WPARAM16 wParam16, UINT *pms
ATOM hi;
HANDLE lo32 = 0;
*pwparam32 = WIN_Handle32(wParam16);
*pwparam32 = (WPARAM)WIN_Handle32(wParam16);
lo16 = LOWORD(*plparam);
hi = HIWORD(*plparam);
if (lo16 && !(lo32 = convert_handle_16_to_32(lo16, GMEM_DDESHARE)))
@ -1388,7 +1388,7 @@ INT WINPROC_MapMsg16To32A( HWND hwnd, UINT16 msg16, WPARAM16 wParam16, UINT *pms
int flag = 0;
char buf[2];
*pwparam32 = WIN_Handle32(wParam16);
*pwparam32 = (WPARAM)WIN_Handle32(wParam16);
lo = LOWORD(*plparam);
hi = HIWORD(*plparam);
@ -1522,7 +1522,7 @@ LRESULT WINPROC_UnmapMsg16To32A( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPar
case WM_NEXTMENU:
{
MDINEXTMENU *next = (MDINEXTMENU *)lParam;
result = MAKELONG( next->hmenuNext, WIN_Handle16(next->hwndNext) );
result = MAKELONG( next->hmenuNext, HWND_16(next->hwndNext) );
HeapFree( GetProcessHeap(), 0, next );
}
break;
@ -1923,7 +1923,7 @@ INT WINPROC_MapMsg32ATo16( HWND hwnd, UINT msg32, WPARAM wParam32,
if (!cis) return -1;
cis->CtlType = (UINT16)cis32->CtlType;
cis->CtlID = (UINT16)cis32->CtlID;
cis->hwndItem = WIN_Handle16( cis32->hwndItem );
cis->hwndItem = HWND_16( cis32->hwndItem );
cis->itemID1 = (UINT16)cis32->itemID1;
cis->itemData1 = cis32->itemData1;
cis->itemID2 = (UINT16)cis32->itemID2;
@ -1940,7 +1940,7 @@ INT WINPROC_MapMsg32ATo16( HWND hwnd, UINT msg32, WPARAM wParam32,
dis->CtlID = (UINT16)dis32->CtlID;
dis->itemID = (UINT16)dis32->itemID;
dis->hwndItem = (dis->CtlType == ODT_MENU) ? (HWND16)LOWORD(dis32->hwndItem)
: WIN_Handle16( dis32->hwndItem );
: HWND_16( dis32->hwndItem );
dis->itemData = dis32->itemData;
*plparam = MapLS( dis );
}
@ -1955,7 +1955,7 @@ INT WINPROC_MapMsg32ATo16( HWND hwnd, UINT msg32, WPARAM wParam32,
dis->itemID = (UINT16)dis32->itemID;
dis->itemAction = (UINT16)dis32->itemAction;
dis->itemState = (UINT16)dis32->itemState;
dis->hwndItem = WIN_Handle16( dis32->hwndItem );
dis->hwndItem = HWND_16( dis32->hwndItem );
dis->hDC = (HDC16)dis32->hDC;
dis->itemData = dis32->itemData;
CONV_RECT32TO16( &dis32->rcItem, &dis->rcItem );
@ -2038,7 +2038,7 @@ INT WINPROC_MapMsg32ATo16( HWND hwnd, UINT msg32, WPARAM wParam32,
}
else
{
*pwparam16 = WIN_Handle16( (HWND)wParam32 );
*pwparam16 = HWND_16( (HWND)wParam32 );
*plparam = 0;
}
return 0;
@ -2108,7 +2108,7 @@ INT WINPROC_MapMsg32ATo16( HWND hwnd, UINT msg32, WPARAM wParam32,
LPMSG16 msg16 = HeapAlloc( GetProcessHeap(), 0, sizeof(MSG16) );
if (!msg16) return -1;
msg16->hwnd = WIN_Handle16( msg32->hwnd );
msg16->hwnd = HWND_16( msg32->hwnd );
msg16->lParam = msg32->lParam;
msg16->time = msg32->time;
CONV_POINT32TO16(&msg32->pt,&msg16->pt);
@ -2148,7 +2148,7 @@ INT WINPROC_MapMsg32ATo16( HWND hwnd, UINT msg32, WPARAM wParam32,
case WM_DDE_TERMINATE:
case WM_DDE_UNADVISE:
case WM_DDE_REQUEST:
*pwparam16 = WIN_Handle16(wParam32);
*pwparam16 = HWND_16((HWND)wParam32);
return 0;
case WM_DDE_ADVISE:
case WM_DDE_DATA:
@ -2157,7 +2157,7 @@ INT WINPROC_MapMsg32ATo16( HWND hwnd, UINT msg32, WPARAM wParam32,
unsigned lo32, hi;
HANDLE16 lo16 = 0;
*pwparam16 = WIN_Handle16(wParam32);
*pwparam16 = HWND_16((HWND)wParam32);
UnpackDDElParam(msg32, *plparam, &lo32, &hi);
if (lo32 && !(lo16 = convert_handle_32_to_16(lo32, GMEM_DDESHARE)))
return -1;
@ -2170,7 +2170,7 @@ INT WINPROC_MapMsg32ATo16( HWND hwnd, UINT msg32, WPARAM wParam32,
int flag = 0;
char buf[2];
*pwparam16 = WIN_Handle16(wParam32);
*pwparam16 = HWND_16((HWND)wParam32);
UnpackDDElParam(msg32, *plparam, &lo, &hi);
@ -2672,7 +2672,7 @@ static LRESULT WINAPI WINPROC_CallProc32ATo16( WNDPROC16 func, HWND hwnd,
mp16.lParam = lParam;
if (WINPROC_MapMsg32ATo16( hwnd, msg, wParam, &msg16, &mp16.wParam, &mp16.lParam ) == -1)
return 0;
mp16.lResult = WINPROC_CallWndProc16( func, WIN_Handle16(hwnd), msg16,
mp16.lResult = WINPROC_CallWndProc16( func, HWND_16(hwnd), msg16,
mp16.wParam, mp16.lParam );
WINPROC_UnmapMsg32ATo16( hwnd, msg, wParam, lParam, &mp16 );
return mp16.lResult;
@ -2698,7 +2698,7 @@ static LRESULT WINAPI WINPROC_CallProc32WTo16( WNDPROC16 func, HWND hwnd,
if (WINPROC_MapMsg32WTo16( hwnd, msg, wParam, &msg16, &mp16.wParam,
&mp16.lParam ) == -1)
return 0;
mp16.lResult = WINPROC_CallWndProc16( func, WIN_Handle16(hwnd), msg16,
mp16.lResult = WINPROC_CallWndProc16( func, HWND_16(hwnd), msg16,
mp16.wParam, mp16.lParam );
WINPROC_UnmapMsg32WTo16( hwnd, msg, wParam, lParam, &mp16 );
return mp16.lResult;