Windows2000/private/shell/win16/shell16/msgbox.c
2020-09-30 17:12:32 +02:00

30 lines
775 B
C

#include "shprv.h"
// simple form of Shell message box, does not handle param replacment
// just calls LoadString and MessageBox
int WINAPI ShellMessageBox(HINSTANCE hAppInst, HWND hWnd, LPCSTR lpcText, LPCSTR lpcTitle, UINT fuStyle)
{
char achText[256];
char achTitle[80];
if (HIWORD(lpcText) == 0)
{
LoadString(hAppInst, LOWORD(lpcText), achText, sizeof(achText));
lpcText = (LPCSTR)achText;
}
if (HIWORD(lpcTitle) == 0)
{
if (LOWORD(lpcTitle) == 0)
GetWindowText(hWnd, achTitle, sizeof(achTitle));
else
LoadString(hAppInst, LOWORD(lpcTitle), achTitle, sizeof(achTitle));
lpcTitle = (LPCSTR)achTitle;
}
return MessageBox(hWnd, lpcText, lpcTitle, fuStyle);
}