Module: wine Branch: master Commit: c631bb0b56fb7c4bd780d0fe4e8a265dfa4e5c22 URL: http://source.winehq.org/git/wine.git/?a=commit;h=c631bb0b56fb7c4bd780d0fe4e...
Author: Eric Pouech eric.pouech@orange.fr Date: Tue Apr 22 22:00:44 2008 +0200
winhelp: Simplified message box handling.
---
programs/winhelp/winhelp.c | 24 ++++-------------------- programs/winhelp/winhelp.h | 1 - 2 files changed, 4 insertions(+), 21 deletions(-)
diff --git a/programs/winhelp/winhelp.c b/programs/winhelp/winhelp.c index 0801cd6..303811f 100644 --- a/programs/winhelp/winhelp.c +++ b/programs/winhelp/winhelp.c @@ -759,7 +759,8 @@ static LRESULT CALLBACK WINHELP_MainWndProc(HWND hWnd, UINT msg, WPARAM wParam, if (button) MACRO_ExecuteMacro(button->lpszMacro); else if (!HIWORD(wParam)) - WINHELP_MessageBoxIDS(STID_NOT_IMPLEMENTED, 0x121, MB_OK); + MessageBox(0, MAKEINTRESOURCE(STID_NOT_IMPLEMENTED), + MAKEINTRESOURCE(STID_WHERROR), MB_OK); break; } break; @@ -1913,34 +1914,17 @@ static void WINHELP_InitFonts(HWND hWnd)
/*********************************************************************** * - * WINHELP_MessageBoxIDS - */ -INT WINHELP_MessageBoxIDS(UINT ids_text, UINT ids_title, WORD type) -{ - CHAR text[MAX_STRING_LEN]; - CHAR title[MAX_STRING_LEN]; - - LoadString(Globals.hInstance, ids_text, text, sizeof(text)); - LoadString(Globals.hInstance, ids_title, title, sizeof(title)); - - return MessageBox(0, text, title, type); -} - -/*********************************************************************** - * - * MAIN_MessageBoxIDS_s + * WINHELP_MessageBoxIDS_s */ INT WINHELP_MessageBoxIDS_s(UINT ids_text, LPCSTR str, UINT ids_title, WORD type) { CHAR text[MAX_STRING_LEN]; - CHAR title[MAX_STRING_LEN]; CHAR newtext[MAX_STRING_LEN + MAX_PATH];
LoadString(Globals.hInstance, ids_text, text, sizeof(text)); - LoadString(Globals.hInstance, ids_title, title, sizeof(title)); wsprintf(newtext, text, str);
- return MessageBox(0, newtext, title, type); + return MessageBox(0, newtext, MAKEINTRESOURCE(ids_title), type); }
/****************************************************************** diff --git a/programs/winhelp/winhelp.h b/programs/winhelp/winhelp.h index 81ce74e..af75261 100644 --- a/programs/winhelp/winhelp.h +++ b/programs/winhelp/winhelp.h @@ -184,7 +184,6 @@ BOOL WINHELP_CreateHelpWindow(WINHELP_WNDPAGE*, int, BOOL); BOOL WINHELP_GetOpenFileName(LPSTR, int); BOOL WINHELP_CreateIndexWindow(void); void WINHELP_DeleteBackSet(WINHELP_WINDOW*); -INT WINHELP_MessageBoxIDS(UINT, UINT, WORD); INT WINHELP_MessageBoxIDS_s(UINT, LPCSTR, UINT, WORD); HLPFILE* WINHELP_LookupHelpFile(LPCSTR lpszFile); HLPFILE_WINDOWINFO* WINHELP_GetWindowInfo(HLPFILE* hlpfile, LPCSTR name);