Replace SendMessage16 by SendMessageW where possible.
This commit is contained in:
parent
e6533a6b71
commit
cb25e2506f
|
@ -12,13 +12,13 @@
|
||||||
struct tagWND;
|
struct tagWND;
|
||||||
|
|
||||||
extern LONG NC_HandleNCPaint( HWND hwnd , HRGN clip);
|
extern LONG NC_HandleNCPaint( HWND hwnd , HRGN clip);
|
||||||
extern LONG NC_HandleNCActivate( struct tagWND *pwnd, WPARAM16 wParam );
|
extern LONG NC_HandleNCActivate( struct tagWND *pwnd, WPARAM wParam );
|
||||||
extern LONG NC_HandleNCCalcSize( struct tagWND *pWnd, RECT *winRect );
|
extern LONG NC_HandleNCCalcSize( struct tagWND *pWnd, RECT *winRect );
|
||||||
extern LONG NC_HandleNCHitTest( HWND hwnd, POINT pt );
|
extern LONG NC_HandleNCHitTest( HWND hwnd, POINT pt );
|
||||||
extern LONG NC_HandleNCLButtonDown( struct tagWND* pWnd, WPARAM16 wParam, LPARAM lParam );
|
extern LONG NC_HandleNCLButtonDown( struct tagWND* pWnd, WPARAM wParam, LPARAM lParam );
|
||||||
extern LONG NC_HandleNCLButtonDblClk( struct tagWND *pWnd, WPARAM16 wParam, LPARAM lParam);
|
extern LONG NC_HandleNCLButtonDblClk( struct tagWND *pWnd, WPARAM wParam, LPARAM lParam);
|
||||||
extern LONG NC_HandleSysCommand( HWND hwnd, WPARAM wParam, POINT pt );
|
extern LONG NC_HandleSysCommand( HWND hwnd, WPARAM wParam, POINT pt );
|
||||||
extern LONG NC_HandleSetCursor( HWND hwnd, WPARAM16 wParam, LPARAM lParam );
|
extern LONG NC_HandleSetCursor( HWND hwnd, WPARAM wParam, LPARAM lParam );
|
||||||
extern void NC_DrawSysButton( HWND hwnd, HDC hdc, BOOL down );
|
extern void NC_DrawSysButton( HWND hwnd, HDC hdc, BOOL down );
|
||||||
extern BOOL NC_DrawSysButton95( HWND hwnd, HDC hdc, BOOL down );
|
extern BOOL NC_DrawSysButton95( HWND hwnd, HDC hdc, BOOL down );
|
||||||
extern BOOL NC_GetSysPopupPos( struct tagWND* wndPtr, RECT* rect );
|
extern BOOL NC_GetSysPopupPos( struct tagWND* wndPtr, RECT* rect );
|
||||||
|
|
|
@ -30,7 +30,6 @@
|
||||||
#include "wine/winuser16.h"
|
#include "wine/winuser16.h"
|
||||||
#include "wine/winbase16.h"
|
#include "wine/winbase16.h"
|
||||||
#include "heap.h"
|
#include "heap.h"
|
||||||
#include "message.h"
|
|
||||||
#include "user.h"
|
#include "user.h"
|
||||||
#include "clipboard.h"
|
#include "clipboard.h"
|
||||||
#include "debugtools.h"
|
#include "debugtools.h"
|
||||||
|
@ -411,8 +410,7 @@ static BOOL CLIPBOARD_RenderFormat(LPWINE_CLIPFORMAT lpFormat)
|
||||||
* data requested into the clipboard.
|
* data requested into the clipboard.
|
||||||
*/
|
*/
|
||||||
TRACE("Sending WM_RENDERFORMAT message\n");
|
TRACE("Sending WM_RENDERFORMAT message\n");
|
||||||
SendMessage16(hWndClipOwner,WM_RENDERFORMAT,
|
SendMessageW( hWndClipOwner, WM_RENDERFORMAT, (WPARAM)lpFormat->wFormatID, 0 );
|
||||||
(WPARAM16)lpFormat->wFormatID,0L);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -770,8 +768,7 @@ BOOL WINAPI CloseClipboard(void)
|
||||||
{
|
{
|
||||||
hWndClipWindow = 0;
|
hWndClipWindow = 0;
|
||||||
|
|
||||||
if (bCBHasChanged && hWndViewer)
|
if (bCBHasChanged && hWndViewer) SendMessageW( hWndViewer, WM_DRAWCLIPBOARD, 0, 0 );
|
||||||
SendMessage16(hWndViewer, WM_DRAWCLIPBOARD, 0, 0L);
|
|
||||||
hClipLock = 0;
|
hClipLock = 0;
|
||||||
}
|
}
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
@ -803,8 +800,7 @@ BOOL WINAPI EmptyClipboard(void)
|
||||||
|
|
||||||
/* destroy private objects */
|
/* destroy private objects */
|
||||||
|
|
||||||
if (hWndClipOwner)
|
if (hWndClipOwner) SendMessageW( hWndClipOwner, WM_DESTROYCLIPBOARD, 0, 0 );
|
||||||
SendMessage16(hWndClipOwner, WM_DESTROYCLIPBOARD, 0, 0L);
|
|
||||||
|
|
||||||
/* empty the cache */
|
/* empty the cache */
|
||||||
CLIPBOARD_EmptyCache(TRUE);
|
CLIPBOARD_EmptyCache(TRUE);
|
||||||
|
@ -1368,8 +1364,7 @@ BOOL WINAPI ChangeClipboardChain(HWND hWnd, HWND hWndNext)
|
||||||
FIXME("(0x%04x, 0x%04x): stub?\n", hWnd, hWndNext);
|
FIXME("(0x%04x, 0x%04x): stub?\n", hWnd, hWndNext);
|
||||||
|
|
||||||
if( hWndViewer )
|
if( hWndViewer )
|
||||||
bRet = !SendMessage16( hWndViewer, WM_CHANGECBCHAIN,
|
bRet = !SendMessageW( hWndViewer, WM_CHANGECBCHAIN, (WPARAM)hWnd, (LPARAM)hWndNext );
|
||||||
(WPARAM16)hWnd, (LPARAM)hWndNext);
|
|
||||||
else
|
else
|
||||||
WARN("hWndViewer is lost\n");
|
WARN("hWndViewer is lost\n");
|
||||||
|
|
||||||
|
|
|
@ -26,11 +26,11 @@ static void DEFDLG_SetFocus( HWND hwndDlg, HWND hwndCtrl )
|
||||||
|
|
||||||
if (IsChild( hwndDlg, hwndPrev ))
|
if (IsChild( hwndDlg, hwndPrev ))
|
||||||
{
|
{
|
||||||
if (SendMessage16( hwndPrev, WM_GETDLGCODE, 0, 0 ) & DLGC_HASSETSEL)
|
if (SendMessageW( hwndPrev, WM_GETDLGCODE, 0, 0 ) & DLGC_HASSETSEL)
|
||||||
SendMessage16( hwndPrev, EM_SETSEL16, TRUE, MAKELONG( -1, 0 ) );
|
SendMessageW( hwndPrev, EM_SETSEL, -1, 0 );
|
||||||
}
|
}
|
||||||
if (SendMessage16( hwndCtrl, WM_GETDLGCODE, 0, 0 ) & DLGC_HASSETSEL)
|
if (SendMessageW( hwndCtrl, WM_GETDLGCODE, 0, 0 ) & DLGC_HASSETSEL)
|
||||||
SendMessage16( hwndCtrl, EM_SETSEL16, FALSE, MAKELONG( 0, -1 ) );
|
SendMessageW( hwndCtrl, EM_SETSEL, 0, -1 );
|
||||||
SetFocus( hwndCtrl );
|
SetFocus( hwndCtrl );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -77,7 +77,7 @@ static HWND DEFDLG_FindDefButton( HWND hwndDlg )
|
||||||
HWND hwndChild = GetWindow( hwndDlg, GW_CHILD );
|
HWND hwndChild = GetWindow( hwndDlg, GW_CHILD );
|
||||||
while (hwndChild)
|
while (hwndChild)
|
||||||
{
|
{
|
||||||
if (SendMessage16( hwndChild, WM_GETDLGCODE, 0, 0 ) & DLGC_DEFPUSHBUTTON)
|
if (SendMessageW( hwndChild, WM_GETDLGCODE, 0, 0 ) & DLGC_DEFPUSHBUTTON)
|
||||||
break;
|
break;
|
||||||
hwndChild = GetWindow( hwndChild, GW_HWNDNEXT );
|
hwndChild = GetWindow( hwndChild, GW_HWNDNEXT );
|
||||||
}
|
}
|
||||||
|
@ -94,7 +94,7 @@ static BOOL DEFDLG_SetDefButton( HWND hwndDlg, DIALOGINFO *dlgInfo,
|
||||||
HWND hwndNew )
|
HWND hwndNew )
|
||||||
{
|
{
|
||||||
if (hwndNew &&
|
if (hwndNew &&
|
||||||
!(SendMessage16(hwndNew, WM_GETDLGCODE, 0, 0 ) & DLGC_UNDEFPUSHBUTTON))
|
!(SendMessageW(hwndNew, WM_GETDLGCODE, 0, 0 ) & DLGC_UNDEFPUSHBUTTON))
|
||||||
return FALSE; /* Destination is not a push button */
|
return FALSE; /* Destination is not a push button */
|
||||||
|
|
||||||
if (dlgInfo->idResult) /* There's already a default pushbutton */
|
if (dlgInfo->idResult) /* There's already a default pushbutton */
|
||||||
|
|
|
@ -2186,8 +2186,7 @@ HWND WINAPI GetNextDlgTabItem( HWND hwndDlg, HWND hwndCtrl,
|
||||||
* Helper function for DlgDirSelect*
|
* Helper function for DlgDirSelect*
|
||||||
*/
|
*/
|
||||||
static BOOL DIALOG_DlgDirSelect( HWND hwnd, LPSTR str, INT len,
|
static BOOL DIALOG_DlgDirSelect( HWND hwnd, LPSTR str, INT len,
|
||||||
INT id, BOOL win32, BOOL unicode,
|
INT id, BOOL unicode, BOOL combo )
|
||||||
BOOL combo )
|
|
||||||
{
|
{
|
||||||
char *buffer, *ptr;
|
char *buffer, *ptr;
|
||||||
INT item, size;
|
INT item, size;
|
||||||
|
@ -2196,33 +2195,15 @@ static BOOL DIALOG_DlgDirSelect( HWND hwnd, LPSTR str, INT len,
|
||||||
|
|
||||||
TRACE("%04x '%s' %d\n", hwnd, str, id );
|
TRACE("%04x '%s' %d\n", hwnd, str, id );
|
||||||
if (!listbox) return FALSE;
|
if (!listbox) return FALSE;
|
||||||
if (win32)
|
|
||||||
{
|
|
||||||
item = SendMessageA(listbox, combo ? CB_GETCURSEL
|
|
||||||
: LB_GETCURSEL, 0, 0 );
|
|
||||||
if (item == LB_ERR) return FALSE;
|
|
||||||
size = SendMessageA(listbox, combo ? CB_GETLBTEXTLEN
|
|
||||||
: LB_GETTEXTLEN, 0, 0 );
|
|
||||||
if (size == LB_ERR) return FALSE;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
item = SendMessageA(listbox, combo ? CB_GETCURSEL16
|
|
||||||
: LB_GETCURSEL16, 0, 0 );
|
|
||||||
if (item == LB_ERR) return FALSE;
|
|
||||||
size = SendMessageA(listbox, combo ? CB_GETLBTEXTLEN16
|
|
||||||
: LB_GETTEXTLEN16, 0, 0 );
|
|
||||||
if (size == LB_ERR) return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!(buffer = SEGPTR_ALLOC( size+1 ))) return FALSE;
|
item = SendMessageA(listbox, combo ? CB_GETCURSEL : LB_GETCURSEL, 0, 0 );
|
||||||
|
if (item == LB_ERR) return FALSE;
|
||||||
|
size = SendMessageA(listbox, combo ? CB_GETLBTEXTLEN : LB_GETTEXTLEN, 0, 0 );
|
||||||
|
if (size == LB_ERR) return FALSE;
|
||||||
|
|
||||||
if (win32)
|
if (!(buffer = HeapAlloc( GetProcessHeap(), 0, size+1 ))) return FALSE;
|
||||||
SendMessageA( listbox, combo ? CB_GETLBTEXT : LB_GETTEXT,
|
|
||||||
item, (LPARAM)buffer );
|
SendMessageA( listbox, combo ? CB_GETLBTEXT : LB_GETTEXT, item, (LPARAM)buffer );
|
||||||
else
|
|
||||||
SendMessage16( listbox, combo ? CB_GETLBTEXT16 : LB_GETTEXT16,
|
|
||||||
item, (LPARAM)SEGPTR_GET(buffer) );
|
|
||||||
|
|
||||||
if ((ret = (buffer[0] == '['))) /* drive or directory */
|
if ((ret = (buffer[0] == '['))) /* drive or directory */
|
||||||
{
|
{
|
||||||
|
@ -2246,7 +2227,7 @@ static BOOL DIALOG_DlgDirSelect( HWND hwnd, LPSTR str, INT len,
|
||||||
((LPWSTR)str)[len-1] = 0;
|
((LPWSTR)str)[len-1] = 0;
|
||||||
}
|
}
|
||||||
else lstrcpynA( str, ptr, len );
|
else lstrcpynA( str, ptr, len );
|
||||||
SEGPTR_FREE( buffer );
|
HeapFree( GetProcessHeap(), 0, buffer );
|
||||||
TRACE("Returning %d '%s'\n", ret, str );
|
TRACE("Returning %d '%s'\n", ret, str );
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
@ -2383,7 +2364,7 @@ BOOL16 WINAPI DlgDirSelectComboBox16( HWND16 hwnd, LPSTR str, INT16 id )
|
||||||
*/
|
*/
|
||||||
BOOL16 WINAPI DlgDirSelectEx16( HWND16 hwnd, LPSTR str, INT16 len, INT16 id )
|
BOOL16 WINAPI DlgDirSelectEx16( HWND16 hwnd, LPSTR str, INT16 len, INT16 id )
|
||||||
{
|
{
|
||||||
return DIALOG_DlgDirSelect( hwnd, str, len, id, FALSE, FALSE, FALSE );
|
return DlgDirSelectExA( hwnd, str, len, id );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -2392,7 +2373,7 @@ BOOL16 WINAPI DlgDirSelectEx16( HWND16 hwnd, LPSTR str, INT16 len, INT16 id )
|
||||||
*/
|
*/
|
||||||
BOOL WINAPI DlgDirSelectExA( HWND hwnd, LPSTR str, INT len, INT id )
|
BOOL WINAPI DlgDirSelectExA( HWND hwnd, LPSTR str, INT len, INT id )
|
||||||
{
|
{
|
||||||
return DIALOG_DlgDirSelect( hwnd, str, len, id, TRUE, FALSE, FALSE );
|
return DIALOG_DlgDirSelect( hwnd, str, len, id, FALSE, FALSE );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -2401,7 +2382,7 @@ BOOL WINAPI DlgDirSelectExA( HWND hwnd, LPSTR str, INT len, INT id )
|
||||||
*/
|
*/
|
||||||
BOOL WINAPI DlgDirSelectExW( HWND hwnd, LPWSTR str, INT len, INT id )
|
BOOL WINAPI DlgDirSelectExW( HWND hwnd, LPWSTR str, INT len, INT id )
|
||||||
{
|
{
|
||||||
return DIALOG_DlgDirSelect( hwnd, (LPSTR)str, len, id, TRUE, TRUE, FALSE );
|
return DIALOG_DlgDirSelect( hwnd, (LPSTR)str, len, id, TRUE, FALSE );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -2411,7 +2392,7 @@ BOOL WINAPI DlgDirSelectExW( HWND hwnd, LPWSTR str, INT len, INT id )
|
||||||
BOOL16 WINAPI DlgDirSelectComboBoxEx16( HWND16 hwnd, LPSTR str, INT16 len,
|
BOOL16 WINAPI DlgDirSelectComboBoxEx16( HWND16 hwnd, LPSTR str, INT16 len,
|
||||||
INT16 id )
|
INT16 id )
|
||||||
{
|
{
|
||||||
return DIALOG_DlgDirSelect( hwnd, str, len, id, FALSE, FALSE, TRUE );
|
return DlgDirSelectComboBoxExA( hwnd, str, len, id );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -2421,7 +2402,7 @@ BOOL16 WINAPI DlgDirSelectComboBoxEx16( HWND16 hwnd, LPSTR str, INT16 len,
|
||||||
BOOL WINAPI DlgDirSelectComboBoxExA( HWND hwnd, LPSTR str, INT len,
|
BOOL WINAPI DlgDirSelectComboBoxExA( HWND hwnd, LPSTR str, INT len,
|
||||||
INT id )
|
INT id )
|
||||||
{
|
{
|
||||||
return DIALOG_DlgDirSelect( hwnd, str, len, id, TRUE, FALSE, TRUE );
|
return DIALOG_DlgDirSelect( hwnd, str, len, id, FALSE, TRUE );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -2431,7 +2412,7 @@ BOOL WINAPI DlgDirSelectComboBoxExA( HWND hwnd, LPSTR str, INT len,
|
||||||
BOOL WINAPI DlgDirSelectComboBoxExW( HWND hwnd, LPWSTR str, INT len,
|
BOOL WINAPI DlgDirSelectComboBoxExW( HWND hwnd, LPWSTR str, INT len,
|
||||||
INT id)
|
INT id)
|
||||||
{
|
{
|
||||||
return DIALOG_DlgDirSelect( hwnd, (LPSTR)str, len, id, TRUE, TRUE, TRUE );
|
return DIALOG_DlgDirSelect( hwnd, (LPSTR)str, len, id, TRUE, TRUE );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1547,8 +1547,8 @@ LRESULT WINAPI DefFrameProc16( HWND16 hwnd, HWND16 hwndMDIClient,
|
||||||
case SC_CLOSE:
|
case SC_CLOSE:
|
||||||
case SC_RESTORE:
|
case SC_RESTORE:
|
||||||
if( ci->hwndChildMaximized )
|
if( ci->hwndChildMaximized )
|
||||||
return SendMessage16( ci->hwndChildMaximized, WM_SYSCOMMAND,
|
return SendMessageW( ci->hwndChildMaximized, WM_SYSCOMMAND,
|
||||||
wParam, lParam);
|
wParam, lParam);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -1565,13 +1565,12 @@ LRESULT WINAPI DefFrameProc16( HWND16 hwnd, HWND16 hwndMDIClient,
|
||||||
|
|
||||||
WIN_ReleaseWndPtr(wndPtr);
|
WIN_ReleaseWndPtr(wndPtr);
|
||||||
if( childHwnd )
|
if( childHwnd )
|
||||||
SendMessage16(hwndMDIClient, WM_MDIACTIVATE,
|
SendMessageW( hwndMDIClient, WM_MDIACTIVATE, (WPARAM)childHwnd, 0 );
|
||||||
(WPARAM16)childHwnd , 0L);
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WM_NCACTIVATE:
|
case WM_NCACTIVATE:
|
||||||
SendMessage16(hwndMDIClient, message, wParam, lParam);
|
SendMessageW(hwndMDIClient, message, wParam, lParam);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WM_SETTEXT:
|
case WM_SETTEXT:
|
||||||
|
@ -1744,7 +1743,7 @@ LRESULT WINAPI DefMDIChildProc16( HWND16 hwnd, UINT16 message,
|
||||||
goto END;
|
goto END;
|
||||||
|
|
||||||
case WM_CLOSE:
|
case WM_CLOSE:
|
||||||
SendMessage16(ci->self,WM_MDIDESTROY,(WPARAM16)hwnd,0L);
|
SendMessageW( ci->self, WM_MDIDESTROY, (WPARAM)hwnd, 0 );
|
||||||
retvalue = 0;
|
retvalue = 0;
|
||||||
goto END;
|
goto END;
|
||||||
|
|
||||||
|
@ -1782,8 +1781,8 @@ LRESULT WINAPI DefMDIChildProc16( HWND16 hwnd, UINT16 message,
|
||||||
case SC_MAXIMIZE:
|
case SC_MAXIMIZE:
|
||||||
if( ci->hwndChildMaximized == hwnd)
|
if( ci->hwndChildMaximized == hwnd)
|
||||||
{
|
{
|
||||||
retvalue = SendMessage16( clientWnd->parent->hwndSelf,
|
retvalue = SendMessageW( clientWnd->parent->hwndSelf,
|
||||||
message, wParam, lParam);
|
message, wParam, lParam);
|
||||||
goto END;
|
goto END;
|
||||||
}
|
}
|
||||||
tmpWnd = WIN_FindWndPtr(hwnd);
|
tmpWnd = WIN_FindWndPtr(hwnd);
|
||||||
|
@ -1791,11 +1790,11 @@ LRESULT WINAPI DefMDIChildProc16( HWND16 hwnd, UINT16 message,
|
||||||
WIN_ReleaseWndPtr(tmpWnd);
|
WIN_ReleaseWndPtr(tmpWnd);
|
||||||
break;
|
break;
|
||||||
case SC_NEXTWINDOW:
|
case SC_NEXTWINDOW:
|
||||||
SendMessage16( ci->self, WM_MDINEXT, 0, 0);
|
SendMessageW( ci->self, WM_MDINEXT, 0, 0);
|
||||||
retvalue = 0;
|
retvalue = 0;
|
||||||
goto END;
|
goto END;
|
||||||
case SC_PREVWINDOW:
|
case SC_PREVWINDOW:
|
||||||
SendMessage16( ci->self, WM_MDINEXT, 0, 1);
|
SendMessageW( ci->self, WM_MDINEXT, 0, 1);
|
||||||
retvalue = 0;
|
retvalue = 0;
|
||||||
goto END;
|
goto END;
|
||||||
}
|
}
|
||||||
|
@ -1838,12 +1837,12 @@ LRESULT WINAPI DefMDIChildProc16( HWND16 hwnd, UINT16 message,
|
||||||
|
|
||||||
if( hMaxChild)
|
if( hMaxChild)
|
||||||
{
|
{
|
||||||
SendMessage16( hMaxChild, WM_SETREDRAW, FALSE, 0L );
|
SendMessageW( hMaxChild, WM_SETREDRAW, FALSE, 0 );
|
||||||
|
|
||||||
MDI_RestoreFrameMenu( clientWnd->parent, hMaxChild);
|
MDI_RestoreFrameMenu( clientWnd->parent, hMaxChild);
|
||||||
ShowWindow16( hMaxChild, SW_SHOWNOACTIVATE);
|
ShowWindow16( hMaxChild, SW_SHOWNOACTIVATE);
|
||||||
|
|
||||||
SendMessage16( hMaxChild, WM_SETREDRAW, TRUE, 0L );
|
SendMessageW( hMaxChild, WM_SETREDRAW, TRUE, 0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
TRACE("maximizing child %04x\n", hwnd );
|
TRACE("maximizing child %04x\n", hwnd );
|
||||||
|
@ -1868,7 +1867,7 @@ LRESULT WINAPI DefMDIChildProc16( HWND16 hwnd, UINT16 message,
|
||||||
HWND16 switchTo = MDI_GetWindow(clientWnd, hwnd, TRUE, WS_MINIMIZE);
|
HWND16 switchTo = MDI_GetWindow(clientWnd, hwnd, TRUE, WS_MINIMIZE);
|
||||||
|
|
||||||
if( switchTo )
|
if( switchTo )
|
||||||
SendMessage16( switchTo, WM_CHILDACTIVATE, 0, 0L);
|
SendMessageW( switchTo, WM_CHILDACTIVATE, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
MDI_PostUpdate(clientWnd->hwndSelf, ci, SB_BOTH+1);
|
MDI_PostUpdate(clientWnd->hwndSelf, ci, SB_BOTH+1);
|
||||||
|
@ -1900,8 +1899,7 @@ LRESULT WINAPI DefMDIChildProc16( HWND16 hwnd, UINT16 message,
|
||||||
case WM_SYSCHAR:
|
case WM_SYSCHAR:
|
||||||
if (wParam == '-')
|
if (wParam == '-')
|
||||||
{
|
{
|
||||||
SendMessage16(hwnd,WM_SYSCOMMAND,
|
SendMessageW(hwnd,WM_SYSCOMMAND, SC_KEYMENU, (LPARAM)(DWORD)VK_SPACE);
|
||||||
(WPARAM16)SC_KEYMENU, (LPARAM)(DWORD)VK_SPACE);
|
|
||||||
retvalue = 0;
|
retvalue = 0;
|
||||||
goto END;
|
goto END;
|
||||||
}
|
}
|
||||||
|
@ -2156,11 +2154,17 @@ HWND WINAPI CreateMDIWindowW(
|
||||||
*/
|
*/
|
||||||
BOOL16 WINAPI TranslateMDISysAccel16( HWND16 hwndClient, LPMSG16 msg )
|
BOOL16 WINAPI TranslateMDISysAccel16( HWND16 hwndClient, LPMSG16 msg )
|
||||||
{
|
{
|
||||||
MSG msg32;
|
if (msg->message == WM_KEYDOWN || msg->message == WM_SYSKEYDOWN)
|
||||||
|
{
|
||||||
STRUCT32_MSG16to32(msg, &msg32);
|
MSG msg32;
|
||||||
/* MDICLIENTINFO is still the same for win32 and win16 ... */
|
msg32.hwnd = msg->hwnd;
|
||||||
return TranslateMDISysAccel(hwndClient, &msg32);
|
msg32.message = msg->message;
|
||||||
|
msg32.wParam = msg->wParam;
|
||||||
|
msg32.lParam = msg->lParam;
|
||||||
|
/* MDICLIENTINFO is still the same for win32 and win16 ... */
|
||||||
|
return TranslateMDISysAccel(hwndClient, &msg32);
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**********************************************************************
|
/**********************************************************************
|
||||||
|
|
|
@ -1693,7 +1693,7 @@ LONG NC_HandleNCPaint( HWND hwnd , HRGN clip)
|
||||||
*
|
*
|
||||||
* Handle a WM_NCACTIVATE message. Called from DefWindowProc().
|
* Handle a WM_NCACTIVATE message. Called from DefWindowProc().
|
||||||
*/
|
*/
|
||||||
LONG NC_HandleNCActivate( WND *wndPtr, WPARAM16 wParam )
|
LONG NC_HandleNCActivate( WND *wndPtr, WPARAM wParam )
|
||||||
{
|
{
|
||||||
/* Lotus Notes draws menu descriptions in the caption of its main
|
/* Lotus Notes draws menu descriptions in the caption of its main
|
||||||
* window. When it wants to restore original "system" view, it just
|
* window. When it wants to restore original "system" view, it just
|
||||||
|
@ -1720,7 +1720,7 @@ LONG NC_HandleNCActivate( WND *wndPtr, WPARAM16 wParam )
|
||||||
*
|
*
|
||||||
* Handle a WM_SETCURSOR message. Called from DefWindowProc().
|
* Handle a WM_SETCURSOR message. Called from DefWindowProc().
|
||||||
*/
|
*/
|
||||||
LONG NC_HandleSetCursor( HWND hwnd, WPARAM16 wParam, LPARAM lParam )
|
LONG NC_HandleSetCursor( HWND hwnd, WPARAM wParam, LPARAM lParam )
|
||||||
{
|
{
|
||||||
if (hwnd != (HWND)wParam) return 0; /* Don't set the cursor for child windows */
|
if (hwnd != (HWND)wParam) return 0; /* Don't set the cursor for child windows */
|
||||||
|
|
||||||
|
@ -2052,7 +2052,7 @@ END:
|
||||||
*
|
*
|
||||||
* Handle a WM_NCLBUTTONDOWN message. Called from DefWindowProc().
|
* Handle a WM_NCLBUTTONDOWN message. Called from DefWindowProc().
|
||||||
*/
|
*/
|
||||||
LONG NC_HandleNCLButtonDown( WND* pWnd, WPARAM16 wParam, LPARAM lParam )
|
LONG NC_HandleNCLButtonDown( WND* pWnd, WPARAM wParam, LPARAM lParam )
|
||||||
{
|
{
|
||||||
HWND hwnd = pWnd->hwndSelf;
|
HWND hwnd = pWnd->hwndSelf;
|
||||||
|
|
||||||
|
@ -2062,7 +2062,7 @@ LONG NC_HandleNCLButtonDown( WND* pWnd, WPARAM16 wParam, LPARAM lParam )
|
||||||
hwnd = WIN_GetTopParent(hwnd);
|
hwnd = WIN_GetTopParent(hwnd);
|
||||||
|
|
||||||
if( WINPOS_SetActiveWindow(hwnd, TRUE, TRUE) || (GetActiveWindow() == hwnd) )
|
if( WINPOS_SetActiveWindow(hwnd, TRUE, TRUE) || (GetActiveWindow() == hwnd) )
|
||||||
SendMessage16( pWnd->hwndSelf, WM_SYSCOMMAND, SC_MOVE + HTCAPTION, lParam );
|
SendMessageW( pWnd->hwndSelf, WM_SYSCOMMAND, SC_MOVE + HTCAPTION, lParam );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case HTSYSMENU:
|
case HTSYSMENU:
|
||||||
|
@ -2077,20 +2077,20 @@ LONG NC_HandleNCLButtonDown( WND* pWnd, WPARAM16 wParam, LPARAM lParam )
|
||||||
NC_DrawSysButton95( hwnd, hDC, TRUE );
|
NC_DrawSysButton95( hwnd, hDC, TRUE );
|
||||||
ReleaseDC( hwnd, hDC );
|
ReleaseDC( hwnd, hDC );
|
||||||
}
|
}
|
||||||
SendMessage16( hwnd, WM_SYSCOMMAND, SC_MOUSEMENU + HTSYSMENU, lParam );
|
SendMessageW( hwnd, WM_SYSCOMMAND, SC_MOUSEMENU + HTSYSMENU, lParam );
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case HTMENU:
|
case HTMENU:
|
||||||
SendMessage16( hwnd, WM_SYSCOMMAND, SC_MOUSEMENU, lParam );
|
SendMessageW( hwnd, WM_SYSCOMMAND, SC_MOUSEMENU, lParam );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case HTHSCROLL:
|
case HTHSCROLL:
|
||||||
SendMessage16( hwnd, WM_SYSCOMMAND, SC_HSCROLL + HTHSCROLL, lParam );
|
SendMessageW( hwnd, WM_SYSCOMMAND, SC_HSCROLL + HTHSCROLL, lParam );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case HTVSCROLL:
|
case HTVSCROLL:
|
||||||
SendMessage16( hwnd, WM_SYSCOMMAND, SC_VSCROLL + HTVSCROLL, lParam );
|
SendMessageW( hwnd, WM_SYSCOMMAND, SC_VSCROLL + HTVSCROLL, lParam );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case HTMINBUTTON:
|
case HTMINBUTTON:
|
||||||
|
@ -2115,7 +2115,7 @@ LONG NC_HandleNCLButtonDown( WND* pWnd, WPARAM16 wParam, LPARAM lParam )
|
||||||
case HTBOTTOMLEFT:
|
case HTBOTTOMLEFT:
|
||||||
case HTBOTTOMRIGHT:
|
case HTBOTTOMRIGHT:
|
||||||
/* make sure hittest fits into 0xf and doesn't overlap with HTSYSMENU */
|
/* make sure hittest fits into 0xf and doesn't overlap with HTSYSMENU */
|
||||||
SendMessage16( hwnd, WM_SYSCOMMAND, SC_SIZE + wParam - 2, lParam);
|
SendMessageW( hwnd, WM_SYSCOMMAND, SC_SIZE + wParam - 2, lParam);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case HTBORDER:
|
case HTBORDER:
|
||||||
|
@ -2130,7 +2130,7 @@ LONG NC_HandleNCLButtonDown( WND* pWnd, WPARAM16 wParam, LPARAM lParam )
|
||||||
*
|
*
|
||||||
* Handle a WM_NCLBUTTONDBLCLK message. Called from DefWindowProc().
|
* Handle a WM_NCLBUTTONDBLCLK message. Called from DefWindowProc().
|
||||||
*/
|
*/
|
||||||
LONG NC_HandleNCLButtonDblClk( WND *pWnd, WPARAM16 wParam, LPARAM lParam )
|
LONG NC_HandleNCLButtonDblClk( WND *pWnd, WPARAM wParam, LPARAM lParam )
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* if this is an icon, send a restore since we are handling
|
* if this is an icon, send a restore since we are handling
|
||||||
|
@ -2138,7 +2138,7 @@ LONG NC_HandleNCLButtonDblClk( WND *pWnd, WPARAM16 wParam, LPARAM lParam )
|
||||||
*/
|
*/
|
||||||
if (pWnd->dwStyle & WS_MINIMIZE)
|
if (pWnd->dwStyle & WS_MINIMIZE)
|
||||||
{
|
{
|
||||||
SendMessage16( pWnd->hwndSelf, WM_SYSCOMMAND, SC_RESTORE, lParam );
|
SendMessageW( pWnd->hwndSelf, WM_SYSCOMMAND, SC_RESTORE, lParam );
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2147,24 +2147,21 @@ LONG NC_HandleNCLButtonDblClk( WND *pWnd, WPARAM16 wParam, LPARAM lParam )
|
||||||
case HTCAPTION:
|
case HTCAPTION:
|
||||||
/* stop processing if WS_MAXIMIZEBOX is missing */
|
/* stop processing if WS_MAXIMIZEBOX is missing */
|
||||||
if (pWnd->dwStyle & WS_MAXIMIZEBOX)
|
if (pWnd->dwStyle & WS_MAXIMIZEBOX)
|
||||||
SendMessage16( pWnd->hwndSelf, WM_SYSCOMMAND,
|
SendMessageW( pWnd->hwndSelf, WM_SYSCOMMAND,
|
||||||
(pWnd->dwStyle & WS_MAXIMIZE) ? SC_RESTORE : SC_MAXIMIZE,
|
(pWnd->dwStyle & WS_MAXIMIZE) ? SC_RESTORE : SC_MAXIMIZE, lParam );
|
||||||
lParam );
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case HTSYSMENU:
|
case HTSYSMENU:
|
||||||
if (!(GetClassWord(pWnd->hwndSelf, GCW_STYLE) & CS_NOCLOSE))
|
if (!(GetClassWord(pWnd->hwndSelf, GCW_STYLE) & CS_NOCLOSE))
|
||||||
SendMessage16( pWnd->hwndSelf, WM_SYSCOMMAND, SC_CLOSE, lParam );
|
SendMessageW( pWnd->hwndSelf, WM_SYSCOMMAND, SC_CLOSE, lParam );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case HTHSCROLL:
|
case HTHSCROLL:
|
||||||
SendMessage16( pWnd->hwndSelf, WM_SYSCOMMAND, SC_HSCROLL + HTHSCROLL,
|
SendMessageW( pWnd->hwndSelf, WM_SYSCOMMAND, SC_HSCROLL + HTHSCROLL, lParam );
|
||||||
lParam );
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case HTVSCROLL:
|
case HTVSCROLL:
|
||||||
SendMessage16( pWnd->hwndSelf, WM_SYSCOMMAND, SC_VSCROLL + HTVSCROLL,
|
SendMessageW( pWnd->hwndSelf, WM_SYSCOMMAND, SC_VSCROLL + HTVSCROLL, lParam );
|
||||||
lParam );
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -203,7 +203,7 @@ BOOL WINAPI ExitWindowsEx( UINT flags, DWORD reserved )
|
||||||
{
|
{
|
||||||
/* Make sure that the window still exists */
|
/* Make sure that the window still exists */
|
||||||
if (!IsWindow( (*ppWnd)->hwndSelf )) continue;
|
if (!IsWindow( (*ppWnd)->hwndSelf )) continue;
|
||||||
if (!SendMessage16( (*ppWnd)->hwndSelf, WM_QUERYENDSESSION, 0, 0 ))
|
if (!SendMessageW( (*ppWnd)->hwndSelf, WM_QUERYENDSESSION, 0, 0 ))
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
result = !(*ppWnd);
|
result = !(*ppWnd);
|
||||||
|
@ -213,7 +213,7 @@ BOOL WINAPI ExitWindowsEx( UINT flags, DWORD reserved )
|
||||||
for (ppWnd = list; i > 0; i--, ppWnd++)
|
for (ppWnd = list; i > 0; i--, ppWnd++)
|
||||||
{
|
{
|
||||||
if (!IsWindow( (*ppWnd)->hwndSelf )) continue;
|
if (!IsWindow( (*ppWnd)->hwndSelf )) continue;
|
||||||
SendMessage16( (*ppWnd)->hwndSelf, WM_ENDSESSION, result, 0 );
|
SendMessageW( (*ppWnd)->hwndSelf, WM_ENDSESSION, result, 0 );
|
||||||
}
|
}
|
||||||
WIN_ReleaseWinArray(list);
|
WIN_ReleaseWinArray(list);
|
||||||
|
|
||||||
|
|
|
@ -2164,7 +2164,7 @@ BOOL WINAPI SetWindowTextW( HWND hwnd, LPCWSTR lpString )
|
||||||
*/
|
*/
|
||||||
INT16 WINAPI GetWindowTextLength16( HWND16 hwnd )
|
INT16 WINAPI GetWindowTextLength16( HWND16 hwnd )
|
||||||
{
|
{
|
||||||
return (INT16)SendMessage16( hwnd, WM_GETTEXTLENGTH, 0, 0 );
|
return (INT16)GetWindowTextLengthA( hwnd );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -2985,7 +2985,7 @@ BOOL WINAPI FlashWindow( HWND hWnd, BOOL bInvert )
|
||||||
{
|
{
|
||||||
HDC hDC = GetDC(hWnd);
|
HDC hDC = GetDC(hWnd);
|
||||||
|
|
||||||
if (!SendMessage16( hWnd, WM_ERASEBKGND, (WPARAM16)hDC, 0 ))
|
if (!SendMessageW( hWnd, WM_ERASEBKGND, (WPARAM16)hDC, 0 ))
|
||||||
wndPtr->flags |= WIN_NEEDS_ERASEBKGND;
|
wndPtr->flags |= WIN_NEEDS_ERASEBKGND;
|
||||||
|
|
||||||
ReleaseDC( hWnd, hDC );
|
ReleaseDC( hWnd, hDC );
|
||||||
|
@ -3005,7 +3005,7 @@ BOOL WINAPI FlashWindow( HWND hWnd, BOOL bInvert )
|
||||||
if (bInvert) wparam = !(wndPtr->flags & WIN_NCACTIVATED);
|
if (bInvert) wparam = !(wndPtr->flags & WIN_NCACTIVATED);
|
||||||
else wparam = (hWnd == GetActiveWindow());
|
else wparam = (hWnd == GetActiveWindow());
|
||||||
|
|
||||||
SendMessage16( hWnd, WM_NCACTIVATE, wparam, (LPARAM)0 );
|
SendMessageW( hWnd, WM_NCACTIVATE, wparam, (LPARAM)0 );
|
||||||
WIN_ReleaseWndPtr(wndPtr);
|
WIN_ReleaseWndPtr(wndPtr);
|
||||||
return wparam;
|
return wparam;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1543,8 +1543,8 @@ BOOL WINPOS_SetActiveWindow( HWND hWnd, BOOL fMouse, BOOL fChangeFocus)
|
||||||
PERQDATA_SetActiveWnd( pOldActiveQueue->pQData, 0 );
|
PERQDATA_SetActiveWnd( pOldActiveQueue->pQData, 0 );
|
||||||
|
|
||||||
/* send palette messages */
|
/* send palette messages */
|
||||||
if (hWnd && SendMessage16( hWnd, WM_QUERYNEWPALETTE, 0, 0L))
|
if (hWnd && SendMessageW( hWnd, WM_QUERYNEWPALETTE, 0, 0L))
|
||||||
SendMessage16((HWND16)-1, WM_PALETTEISCHANGING, (WPARAM16)hWnd, 0L );
|
SendMessageW( HWND_BROADCAST, WM_PALETTEISCHANGING, (WPARAM)hWnd, 0 );
|
||||||
|
|
||||||
/* if prev wnd is minimized redraw icon title */
|
/* if prev wnd is minimized redraw icon title */
|
||||||
if( IsIconic( hwndPrevActive ) ) WINPOS_RedrawIconTitle(hwndPrevActive);
|
if( IsIconic( hwndPrevActive ) ) WINPOS_RedrawIconTitle(hwndPrevActive);
|
||||||
|
|
Loading…
Reference in New Issue