--- mstools/samples/printer/printer.c 2018/08/09 18:21:29 1.1.1.1 +++ mstools/samples/printer/printer.c 2018/08/09 18:23:30 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: PRINTER.C @@ -43,10 +54,6 @@ * AbortProc - msg loop for abort * AbortDlgProc - processes abort dialog messages * -* -* Microsoft Developer Support -* Copyright (c) 1992 Microsoft Corporation -* \******************************************************************************/ #include @@ -108,7 +115,7 @@ int WINAPI WinMain (HANDLE ghInstance, H ShowWindow (ghwndMain, nCmdShow); - while (GetMessage (&msg, NULL, NULL, NULL)) + while (GetMessage (&msg, NULL, 0, 0)) { TranslateMessage (&msg); DispatchMessage (&msg); @@ -152,7 +159,7 @@ LRESULT CALLBACK MainWndProc (HWND hwnd, DWORD threadId; if (!CreateThread (NULL, 0, (LPTHREAD_START_ROUTINE) PrintThread, - (LPVOID) wParam, NULL, &threadId)) + (LPVOID) wParam, 0, &threadId)) MessageBox (hwnd, "MainWndProc(): Error creating print thread", @@ -397,7 +404,7 @@ LRESULT CALLBACK MainWndProc (HWND hwnd, static DWORD adwCustColors[16]; - memset (&cc, 0, sizeof (CHOOSECOLOR)); + memset ((void *) &cc, 0, sizeof (CHOOSECOLOR)); cc.lStructSize = sizeof (CHOOSECOLOR); cc.hwndOwner = hwnd; @@ -794,7 +801,7 @@ done_painting: case WM_DESTROY: - PostQuitMessage (NULL); + PostQuitMessage (0); break; default: @@ -1004,7 +1011,7 @@ void PrintThread (LPVOID wParam) // specify various printing options... // - memset (&pd, 0, sizeof(PRINTDLG)); + memset ((void *) &pd, 0, sizeof(PRINTDLG)); pd.lStructSize = sizeof(PRINTDLG); pd.hwndOwner = ghwndMain; @@ -1097,7 +1104,7 @@ BOOL CALLBACK AbortProc (HDC hdc, int er { MSG msg; - while (!gbAbort && PeekMessage (&msg, NULL, NULL, NULL, PM_REMOVE)) + while (!gbAbort && PeekMessage (&msg, NULL, 0, 0, PM_REMOVE)) if (!ghwndAbort || !IsDialogMessage (ghwndAbort, &msg)) {