--- mstools/samples/gdidemo/dialog.c 2018/08/09 18:20:45 1.1.1.2 +++ mstools/samples/gdidemo/dialog.c 2018/08/09 18:23:48 1.1.1.3 @@ -1,12 +1,17 @@ + +/******************************************************************************\ +* 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. +\******************************************************************************/ + /*---------------------------------------------------------------------------*\ | DIALOG MODULE | This module contains the dialogbox routines for this application. -| -| -| segment: _DIALOG (DOS16) -| created: 31-Oct-90 -| history: 31-Oct-90 created. -| \*---------------------------------------------------------------------------*/ #include @@ -16,9 +21,6 @@ | DISPLAY DIALOG BOX | This is a routine to display a generic modal-dialog box. | -| created: 20-Oct-90 -| history: 20-Oct-90 created. -| \*---------------------------------------------------------------------------*/ int FAR DisplayDialogBox(HWND hWnd, LPSTR lpszTemplate, WNDPROC lpfFunction, LONG lExtra) { @@ -32,7 +34,7 @@ int FAR DisplayDialogBox(HWND hWnd, LPST { if(lpfDlg = MakeProcInstance(lpfFunction,hInstance)) { - nRet = DialogBoxParam(hInstance,lpszTemplate,hWnd,(DLGPROC)lpfDlg,lExtra); + nRet = DialogBoxParam(hInstance,lpszTemplate,hWnd,(DLGPROC)lpfDlg,lExtra); FreeProcInstance(lpfDlg); } } @@ -42,10 +44,7 @@ int FAR DisplayDialogBox(HWND hWnd, LPST /*---------------------------------------------------------------------------*\ | ABOUT DIALOG PROCEDURE -| This is the main dialogbox routine for the HELPABOUT template. -| -| created: 31-Oct-90 -| history: 31-Oct-90 created. +| This is the main dialog box routine for the HELPABOUT template. | \*---------------------------------------------------------------------------*/ BOOL APIENTRY AboutDlgProc(HWND hDlg, UINT wMsg, WPARAM wParam, LONG lParam) @@ -104,9 +103,6 @@ BOOL APIENTRY AboutDlgProc(HWND hDlg, UI | PAINT WND BACKGROUND | This routine is used to wash the background of a window. | -| created: 23-Jan-91 -| history: 23-Jan-91 created. -| \*---------------------------------------------------------------------------*/ VOID PaintWindow(HWND hWnd, int nColor) { @@ -136,14 +132,14 @@ VOID PaintWindow(HWND hWnd, int nColor) #ifdef WIN16 - SetWindowExtEx(hDC,nSize,nSize); - SetViewportExtEx(hDC,rect.right,-rect.bottom); - SetViewportOrgEx(hDC,0,rect.bottom); + SetWindowExtEx(hDC,nSize,nSize); + SetViewportExtEx(hDC,rect.right,-rect.bottom); + SetViewportOrgEx(hDC,0,rect.bottom); #else - SetWindowExtEx(hDC,nSize,nSize,NULL); - SetViewportExtEx(hDC,rect.right,-rect.bottom,NULL); - SetViewportOrgEx(hDC,0,rect.bottom,NULL); + SetWindowExtEx(hDC,nSize,nSize,NULL); + SetViewportExtEx(hDC,rect.right,-rect.bottom,NULL); + SetViewportOrgEx(hDC,0,rect.bottom,NULL); #endif @@ -164,15 +160,15 @@ VOID PaintWindow(HWND hWnd, int nColor) #ifdef WIN16 - SetWindowExtEx(hDC,512,512); - SetViewportExtEx(hDC,rect.right,-rect.bottom); - SetViewportOrgEx(hDC,0,rect.bottom); + SetWindowExtEx(hDC,512,512); + SetViewportExtEx(hDC,rect.right,-rect.bottom); + SetViewportOrgEx(hDC,0,rect.bottom); #else - SetWindowExtEx(hDC,512,512,NULL); - SetViewportExtEx(hDC,rect.right,-rect.bottom,NULL); - SetViewportOrgEx(hDC,0,rect.bottom,NULL); + SetWindowExtEx(hDC,512,512,NULL); + SetViewportExtEx(hDC,rect.right,-rect.bottom,NULL); + SetViewportOrgEx(hDC,0,rect.bottom,NULL); #endif @@ -202,9 +198,6 @@ VOID PaintWindow(HWND hWnd, int nColor) | This routine creates a palette representing the scale values of a | particular RGB color. A gray-scale palette can also be created. | -| created: 01-Nov-90 -| history: 01-Nov-90 created. -| \*---------------------------------------------------------------------------*/ HPALETTE CreateColorScalePalette(HWND hDC, int nColor) {