Don't rely on UNICODE being #define'ed

svn path=/trunk/; revision=11218
This commit is contained in:
Gé van Geldorp 2004-10-07 19:20:57 +00:00
parent 1541b702fa
commit e961e71fec

View file

@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/ */
/* $Id: messagebox.c,v 1.27 2004/08/15 21:36:30 chorns Exp $ /* $Id: messagebox.c,v 1.28 2004/10/07 19:20:57 gvg Exp $
* *
* PROJECT: ReactOS user32.dll * PROJECT: ReactOS user32.dll
* FILE: lib/user32/windows/messagebox.c * FILE: lib/user32/windows/messagebox.c
@ -204,7 +204,7 @@ static INT_PTR CALLBACK MessageBoxProc( HWND hwnd, UINT message,
#define SAFETY_MARGIN 32 /* Extra number of bytes to allocate in case we counted wrong */ #define SAFETY_MARGIN 32 /* Extra number of bytes to allocate in case we counted wrong */
static int static int
MessageBoxTimeoutIndirectW( MessageBoxTimeoutIndirectW(
CONST MSGBOXPARAMS *lpMsgBoxParams, UINT Timeout) CONST MSGBOXPARAMSW *lpMsgBoxParams, UINT Timeout)
{ {
DLGTEMPLATE *tpl; DLGTEMPLATE *tpl;
DLGITEMTEMPLATE *iico, *itxt; DLGITEMTEMPLATE *iico, *itxt;
@ -213,7 +213,7 @@ MessageBoxTimeoutIndirectW(
HMODULE hUser32; HMODULE hUser32;
LPVOID buf; LPVOID buf;
BYTE *dest; BYTE *dest;
LPWSTR caption, text; LPCWSTR caption, text;
HFONT hFont; HFONT hFont;
HICON Icon; HICON Icon;
HDC hDC; HDC hDC;
@ -237,10 +237,10 @@ MessageBoxTimeoutIndirectW(
else else
caption = (LPWSTR)lpMsgBoxParams->lpszCaption; caption = (LPWSTR)lpMsgBoxParams->lpszCaption;
if(!lpMsgBoxParams->lpszText || !HIWORD((LPWSTR)lpMsgBoxParams->lpszText)) if(!lpMsgBoxParams->lpszText || !HIWORD(lpMsgBoxParams->lpszText))
text = L""; text = L"";
else else
text = (LPWSTR)lpMsgBoxParams->lpszText; text = lpMsgBoxParams->lpszText;
caplen = strlenW(caption); caplen = strlenW(caption);
textlen = strlenW(text); textlen = strlenW(text);
@ -311,7 +311,7 @@ MessageBoxTimeoutIndirectW(
MessageBeep(MB_ICONHAND); MessageBeep(MB_ICONHAND);
break; break;
case MB_USERICON: case MB_USERICON:
Icon = LoadIconW(lpMsgBoxParams->hInstance, (LPCWSTR)lpMsgBoxParams->lpszIcon); Icon = LoadIconW(lpMsgBoxParams->hInstance, lpMsgBoxParams->lpszIcon);
MessageBeep(MB_OK); MessageBeep(MB_OK);
break; break;
default: default: