--- q_a/samples/othrproc/othrproc.c 2018/08/09 18:29:19 1.1.1.1 +++ q_a/samples/othrproc/othrproc.c 2018/08/09 18:30:10 1.1.1.2 @@ -1,3 +1,14 @@ + +/******************************************************************************\ +* This is a part of the Microsoft Source Code Samples. +* Copyright (C) 1993 Microsoft Corporation. +* All rights reserved. +* This source code is only intended as a supplement to +* Microsoft Development Tools and/or WinHelp documentation. +* See these sources for detailed information regarding the +* Microsoft samples programs. +\******************************************************************************/ + /*************************************************************************\ * PROGRAM: othrproc.c * @@ -98,7 +109,7 @@ int APIENTRY WinMain (HANDLE hInstance, hInst = hInstance; - wc.style = NULL; // Replaces CS_SIZEREDRAW. + wc.style = 0; // Replaces CS_SIZEREDRAW. wc.lpfnWndProc = (WNDPROC)MainWndProc; // The client window procedure. wc.cbClsExtra = 0; // No room reserved for extra data. wc.cbWndExtra = 0; @@ -130,7 +141,7 @@ int APIENTRY WinMain (HANDLE hInstance, ShowWindow (hWndDlg, SW_SHOW); ShowWindow (hWnd, nCmdShow); - while (GetMessage (&msg, NULL, NULL, NULL)) + while (GetMessage (&msg, NULL, 0, 0)) if (!IsDialogMessage (hWndDlg, &msg)) { DispatchMessage (&msg); // Dispatch message to window. @@ -217,7 +228,7 @@ LONG APIENTRY MainWndProc (HWND hwnd, return (0); case WM_SIZE : - SetWindowPos (hWndDlg, NULL, 0,0, LOWORD(lParam), DIALOGHEIGHT, NULL); + SetWindowPos (hWndDlg, NULL, 0,0, LOWORD(lParam), DIALOGHEIGHT, 0); return (0); case WM_DESTROY : @@ -287,15 +298,15 @@ VOID ReadProc(VOID) BITMAP bm; POINT ptSize, ptOrg; - try + _try { lParam = MapView[0]; } - except(EXCEPTION_EXECUTE_HANDLER) + _except(EXCEPTION_EXECUTE_HANDLER) { MessageBox( hWnd, "Trying to read shared memory caused an exception.", "From within WM_MOUSEMOVE", MB_OK); - PostMessage(hWnd, WM_DESTROY, NULL, NULL); + PostMessage(hWnd, WM_DESTROY, 0, 0); } hBrush = GetStockObject(WHITE_BRUSH);