mirror of
https://github.com/reactos/wine.git
synced 2024-11-26 21:20:25 +00:00
winhelp: Simplified message box handling.
This commit is contained in:
parent
3ae5ad8ede
commit
c631bb0b56
@ -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);
|
||||
}
|
||||
|
||||
/******************************************************************
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user