Commit 6ebbfd49 authored by Alexandre Julliard's avatar Alexandre Julliard

user: Prefer SendMessageW over SendMessageA where possible.

parent 2164815a
......@@ -159,15 +159,15 @@ static BOOL DEFDLG_SetDefId( HWND hwndDlg, DIALOGINFO *dlgInfo, WPARAM wParam)
/* Make sure the old default control is a valid push button ID */
hwndOld = GetDlgItem( hwndDlg, old_id );
if (!hwndOld || !(SendMessageA( hwndOld, WM_GETDLGCODE, 0, 0) & DLGC_DEFPUSHBUTTON))
if (!hwndOld || !(SendMessageW( hwndOld, WM_GETDLGCODE, 0, 0) & DLGC_DEFPUSHBUTTON))
hwndOld = DEFDLG_FindDefButton( hwndDlg );
if (hwndOld && hwndOld != hwndNew)
SendMessageA( hwndOld, BM_SETSTYLE, BS_PUSHBUTTON, TRUE );
SendMessageW( hwndOld, BM_SETSTYLE, BS_PUSHBUTTON, TRUE );
if (hwndNew)
{
if(dlgcode & DLGC_UNDEFPUSHBUTTON)
SendMessageA( hwndNew, BM_SETSTYLE, BS_DEFPUSHBUTTON, TRUE );
SendMessageW( hwndNew, BM_SETSTYLE, BS_DEFPUSHBUTTON, TRUE );
}
return TRUE;
}
......@@ -197,15 +197,15 @@ static BOOL DEFDLG_SetDefButton( HWND hwndDlg, DIALOGINFO *dlgInfo, HWND hwndNew
}
/* Make sure the old default control is a valid push button ID */
if (!hwndOld || !(SendMessageA( hwndOld, WM_GETDLGCODE, 0, 0) & DLGC_DEFPUSHBUTTON))
if (!hwndOld || !(SendMessageW( hwndOld, WM_GETDLGCODE, 0, 0) & DLGC_DEFPUSHBUTTON))
hwndOld = DEFDLG_FindDefButton( hwndDlg );
if (hwndOld && hwndOld != hwndNew)
SendMessageA( hwndOld, BM_SETSTYLE, BS_PUSHBUTTON, TRUE );
SendMessageW( hwndOld, BM_SETSTYLE, BS_PUSHBUTTON, TRUE );
if (hwndNew)
{
if(dlgcode & DLGC_UNDEFPUSHBUTTON)
SendMessageA( hwndNew, BM_SETSTYLE, BS_DEFPUSHBUTTON, TRUE );
SendMessageW( hwndNew, BM_SETSTYLE, BS_DEFPUSHBUTTON, TRUE );
}
return TRUE;
}
......@@ -300,8 +300,8 @@ static LRESULT DEFDLG_Proc( HWND hwnd, UINT msg, WPARAM wParam,
if (hwndFocus)
{
/* always make combo box hide its listbox control */
if (!SendMessageA( hwndFocus, CB_SHOWDROPDOWN, FALSE, 0 ))
SendMessageA( GetParent(hwndFocus), CB_SHOWDROPDOWN, FALSE, 0 );
if (!SendMessageW( hwndFocus, CB_SHOWDROPDOWN, FALSE, 0 ))
SendMessageW( GetParent(hwndFocus), CB_SHOWDROPDOWN, FALSE, 0 );
}
}
return DefWindowProcA( hwnd, msg, wParam, lParam );
......
......@@ -228,8 +228,8 @@ LRESULT WINAPI IconTitleWndProc( HWND hWnd, UINT msg,
if (wParam) ICONTITLE_SetTitlePos( hWnd, owner );
return 0;
case WM_ERASEBKGND:
if( GetWindowLongA( owner, GWL_STYLE ) & WS_CHILD )
lParam = SendMessageA( owner, WM_ISACTIVEICON, 0, 0 );
if( GetWindowLongW( owner, GWL_STYLE ) & WS_CHILD )
lParam = SendMessageW( owner, WM_ISACTIVEICON, 0, 0 );
else
lParam = (owner == GetActiveWindow());
if( ICONTITLE_Paint( hWnd, owner, (HDC)wParam, (BOOL)lParam ) )
......
......@@ -671,7 +671,7 @@ static LONG MDICascade( HWND client, MDICLIENTINFO *ci )
int i, total;
if (IsZoomed(ci->hwndActiveChild))
SendMessageA(client, WM_MDIRESTORE, (WPARAM)ci->hwndActiveChild, 0);
SendMessageW(client, WM_MDIRESTORE, (WPARAM)ci->hwndActiveChild, 0);
if (ci->nActiveChildren == 0) return 0;
......@@ -724,7 +724,7 @@ static void MDITile( HWND client, MDICLIENTINFO *ci, WPARAM wParam )
BOOL has_icons = FALSE;
if (IsZoomed(ci->hwndActiveChild))
SendMessageA(client, WM_MDIRESTORE, (WPARAM)ci->hwndActiveChild, 0);
SendMessageW(client, WM_MDIRESTORE, (WPARAM)ci->hwndActiveChild, 0);
if (ci->nActiveChildren == 0) return;
......
......@@ -1318,9 +1318,9 @@ static void NC_TrackMinMaxBox( HWND hwnd, WORD wParam )
return;
if (wParam == HTMINBUTTON)
SendMessageA( hwnd, WM_SYSCOMMAND, SC_MINIMIZE, MAKELONG(msg.pt.x,msg.pt.y) );
SendMessageW( hwnd, WM_SYSCOMMAND, SC_MINIMIZE, MAKELONG(msg.pt.x,msg.pt.y) );
else
SendMessageA( hwnd, WM_SYSCOMMAND,
SendMessageW( hwnd, WM_SYSCOMMAND,
IsZoomed(hwnd) ? SC_RESTORE:SC_MAXIMIZE, MAKELONG(msg.pt.x,msg.pt.y) );
}
......@@ -1377,7 +1377,7 @@ static void NC_TrackCloseButton (HWND hwnd, WORD wParam)
ReleaseDC( hwnd, hdc );
if (!pressed) return;
SendMessageA( hwnd, WM_SYSCOMMAND, SC_CLOSE, MAKELONG(msg.pt.x,msg.pt.y) );
SendMessageW( hwnd, WM_SYSCOMMAND, SC_CLOSE, MAKELONG(msg.pt.x,msg.pt.y) );
}
......@@ -1573,7 +1573,7 @@ LRESULT NC_HandleSysCommand( HWND hwnd, WPARAM wParam, LPARAM lParam )
break;
case SC_CLOSE:
return SendMessageA( hwnd, WM_CLOSE, 0, 0 );
return SendMessageW( hwnd, WM_CLOSE, 0, 0 );
case SC_VSCROLL:
case SC_HSCROLL:
......
......@@ -385,7 +385,7 @@ HWND WINPOS_WindowFromPoint( HWND hwndScope, POINT pt, INT *hittest )
*hittest = HTCLIENT;
break;
}
res = SendMessageA( list[i], WM_NCHITTEST, 0, MAKELONG(pt.x,pt.y) );
res = SendMessageW( list[i], WM_NCHITTEST, 0, MAKELONG(pt.x,pt.y) );
if (res != HTTRANSPARENT)
{
*hittest = res; /* Found the window */
......@@ -679,7 +679,7 @@ BOOL WINPOS_RedrawIconTitle( HWND hWnd )
{
if( lpPos->hwndIconTitle )
{
SendMessageA( lpPos->hwndIconTitle, WM_SHOWWINDOW, TRUE, 0);
SendMessageW( lpPos->hwndIconTitle, WM_SHOWWINDOW, TRUE, 0);
InvalidateRect( lpPos->hwndIconTitle, NULL, TRUE );
return TRUE;
}
......@@ -706,7 +706,7 @@ BOOL WINPOS_ShowIconTitle( HWND hwnd, BOOL bShow )
{
if (!IsWindowVisible(title))
{
SendMessageA( title, WM_SHOWWINDOW, TRUE, 0 );
SendMessageW( title, WM_SHOWWINDOW, TRUE, 0 );
SetWindowPos( title, 0, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE |
SWP_NOACTIVATE | SWP_NOZORDER | SWP_SHOWWINDOW );
}
......@@ -795,7 +795,7 @@ void WINPOS_GetMinMaxInfo( HWND hwnd, POINT *maxSize, POINT *maxPos,
MinMax.ptMaxPosition.y = -yinc;
}
SendMessageA( hwnd, WM_GETMINMAXINFO, 0, (LPARAM)&MinMax );
SendMessageW( hwnd, WM_GETMINMAXINFO, 0, (LPARAM)&MinMax );
/* Some sanity checks */
......
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