--- mstools/samples/gdidemo/gdidemo.c 2018/08/09 18:20:01 1.1 +++ mstools/samples/gdidemo/gdidemo.c 2018/08/09 18:23:51 1.1.1.3 @@ -1,14 +1,19 @@ + +/******************************************************************************\ +* 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. +\******************************************************************************/ + /*---------------------------------------------------------------------------*\ | GDIDEMO MODULE | This is the main entry-point module for the GDIDEMO application. It is | intended to provide simple demonstrations of graphical functionality of | WIN32. This module is only concerned with the FRAME-WINDOW object. -| -| -| segment: _TEXT (DOS16) -| created: 31-Oct-90 -| history: 31-Oct-90 created. -| \*---------------------------------------------------------------------------*/ #include @@ -23,10 +28,6 @@ | WINDOWS MAIN PROCEDURE | This is the process entry-point routine. This is the basis for all | application events. -| -| created: 31-Oct-90 -| history: 31-Oct-90 created. -| \*---------------------------------------------------------------------------*/ int PASCAL WinMain(HANDLE hInst, HANDLE hPrevInst, LPSTR lpszLine, int nShow) { @@ -51,7 +52,7 @@ int PASCAL WinMain(HANDLE hInst, HANDLE msg.wParam = 1; if(hWndFrame = CreateAppWindow(hInst)) { - ShowWindow(hWndFrame,nShow); + ShowWindow(hWndFrame,nShow); UpdateWindow(hWndFrame); while(GetMessage(&msg,NULL,0,0)) @@ -70,10 +71,6 @@ int PASCAL WinMain(HANDLE hInst, HANDLE | CLIENT WINDOW PROCEDURE | This is the main window function for the client-window created. This is | the frame window which encompasses the MDI control window. -| -| created: 31-Oct-90 -| history: 31-Oct-90 created. -| \*---------------------------------------------------------------------------*/ LONG APIENTRY WndProc(HWND hWndFrame, UINT wMsg, WPARAM wParam, LONG lParam) { @@ -88,6 +85,15 @@ LONG APIENTRY WndProc(HWND hWndFrame, UI */ case WM_CREATE: CreateProc(hWndFrame); + +/* +** DEMO MODE - These PostMessages Are for Demonstration Only +*/ + PostMessage(hWndFrame,WM_COMMAND,IDM_DEMO_DRAW,0); + PostMessage(hWndFrame,WM_COMMAND,IDM_DEMO_POLYBEZIER,0); + PostMessage(hWndFrame,WM_COMMAND,IDM_DEMO_BOUNCE,0); + PostMessage(hWndFrame,WM_COMMAND,IDM_WINDOW_TILE,0); + break; @@ -135,10 +141,6 @@ LONG APIENTRY WndProc(HWND hWndFrame, UI | This is the main event-handler for the WM_CREATE message. It is here | we create the MDI control window for the application. We store this | information as part of the frame-window extra object information. -| -| created: 31-Oct-90 -| history: 31-Oct-90 created. -| \*---------------------------------------------------------------------------*/ BOOL CreateProc(HWND hWndFrame) { @@ -155,7 +157,7 @@ BOOL CreateProc(HWND hWndFrame) if(hMenu = GetSubMenu(GetMenu(hWndFrame),0)) { ModifyMenu(hMenu,IDM_DEMO_XFORM ,MF_BYCOMMAND | MF_GRAYED,IDM_DEMO_XFORM ,"&XForm"); - ModifyMenu(hMenu,IDM_DEMO_MAZE ,MF_BYCOMMAND | MF_GRAYED,IDM_DEMO_MAZE ,"&Maze"); + ModifyMenu(hMenu,IDM_DEMO_MAZE ,MF_BYCOMMAND | MF_GRAYED,IDM_DEMO_MAZE ,"&Maze"); DrawMenuBar(hWndFrame); } @@ -168,10 +170,6 @@ BOOL CreateProc(HWND hWndFrame) | This is the main event-handler for the WM_COMMAND event for the window | application. All we really do is process the MENU commands for creating | the DEMO windows. -| -| created: 31-Oct-90 -| history: 31-Oct-90 created. -| \*---------------------------------------------------------------------------*/ BOOL CommandProc(HWND hWndFrame, WPARAM wParam, LONG lParam) { @@ -274,10 +272,6 @@ BOOL CommandProc(HWND hWndFrame, WPARAM /*---------------------------------------------------------------------------*\ | CLIENT PAINT PROCEDURE | This is the main event-handler for the WM_PAINT message. -| -| created: 31-Oct-90 -| history: 31-Oct-90 created. -| \*---------------------------------------------------------------------------*/ VOID PaintProc(HWND hWndFrame) { @@ -296,10 +290,6 @@ VOID PaintProc(HWND hWndFrame) | CLIENT DESTROY PROCEDURE | This routine is called to cleanup global resources upon exit of the | application. -| -| created: 31-Oct-90 -| history: 31-Oct-90 created. -| \*---------------------------------------------------------------------------*/ VOID DestroyProc(HWND hWndFrame) {