--- q_a/samples/ntsd/mdi.c 2018/08/09 18:29:19 1.1.1.1 +++ q_a/samples/ntsd/mdi.c 2018/08/09 18:29:36 1.1.1.2 @@ -45,12 +45,14 @@ typedef struct _PerWndInfo { // Forward declarations. // BOOL InitializeApp (void); -LONG MainWndProc (HWND, UINT, DWORD, LONG); -LONG MDIWndProc (HWND, UINT, DWORD, LONG); -LONG About (HWND, UINT, DWORD, LONG); -LONG TextWndProc (HWND, UINT, DWORD, LONG); +LONG APIENTRY MainWndProc (HWND, UINT, DWORD, LONG); +LONG APIENTRY MDIWndProc (HWND, UINT, DWORD, LONG); +LONG APIENTRY About (HWND, UINT, DWORD, LONG); +LONG APIENTRY TextWndProc (HWND, UINT, DWORD, LONG); VOID vTest (PINFO); +extern int FAR PASCAL ShellAbout(HWND, LPCSTR, LPCSTR, HICON); + /***************************************************************************\ * WinMain * @@ -60,9 +62,9 @@ VOID vTest (PINFO); * Added conditional compile statement for internal build environment. * 04-17-91 ???? Created. \***************************************************************************/ -int WinMain( - HANDLE hInstance, - HANDLE hPrevInstance, +int APIENTRY WinMain( + HINSTANCE hInstance, + HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd) { @@ -176,7 +178,7 @@ BOOL InitializeApp(void) * 09-09-91 Created. \***************************************************************************/ -long MainWndProc( +long APIENTRY MainWndProc( HWND hwnd, UINT message, DWORD wParam, @@ -279,8 +281,10 @@ long MainWndProc( case MM_ABOUT: - if (DialogBox(ghModule, "AboutBox", ghwndMain, (DLGPROC)About) == -1) - MessageBox(ghwndMain, "DEMO: About Dialog Creation Error!", "Error", MB_OK); + ShellAbout(ghwndMain, "MDI Demo", "Microsoft Developer Support", NULL); + + // if (DialogBox(ghModule, "AboutBox", ghwndMain, (DLGPROC)About) == -1) + // MessageBox(ghwndMain, "DEMO: About Dialog Creation Error!", "Error", MB_OK); return 0L; // @@ -323,7 +327,7 @@ long MainWndProc( * 04-17-91 ???? Created. \***************************************************************************/ -long MDIWndProc( +long APIENTRY MDIWndProc( HWND hwnd, UINT message, DWORD wParam, @@ -507,7 +511,7 @@ long MDIWndProc( * 04-13-91 ???? Created. \***************************************************************************/ -long About( +long APIENTRY About( HWND hDlg, UINT message, DWORD wParam, @@ -541,7 +545,7 @@ long About( * \***************************************************************************/ -LONG TextWndProc (HWND hwnd, UINT message, DWORD wParam, LONG lParam) +LONG APIENTRY TextWndProc (HWND hwnd, UINT message, DWORD wParam, LONG lParam) { static HFONT hFont = (HFONT) NULL;