home *** CD-ROM | disk | FTP | other *** search
- \comment Windows 3.0 Application Script (Version 1.01)
- \comment
- \comment (C) Copyright DEA Software 1990 All Rights Reserved
- \comment
- \comment
- \nfill
- \npcontrol
- \comment
- \comment This Script creates a MS Windows 3.0 Application
- \comment
- \comment
- \comment @[1,1] = Name of Application
- \comment @[2,1] = Caption string
- \comment @[2,2] = the character Period "."
- \comment
- \comment @[10,1] = Number of Menu items
- \comment @[10,2] = Contains the name of the Menu (NULL or App Name)
- \comment @[1,3] = Number of Child windows
- \comment @[3,1] = Name of child window 1
- \comment @[3,2] = Name of child window 2
- \comment ...
- \comment @[1,4] = 0 == No incon, 1 == Yes icon
- \comment @[1,40] == Name of icon file
- \comment
- \comment @[1,5] = 0 == No cursor, 1 == Yes cursor
- \comment @[1,50] == Cursor number
- \comment @[2,50] == Name of Cursor ID
- \comment
- \comment @[1,63] = 0 == Use default size and location, 1 == use users
- \comment @[1,64] = x start loc
- \comment @[1,65] = y start loc
- \comment @[1,66] = x size
- \comment @[1,67] = y size
- \comment
- \comment @[1,7] = 0 == No Vert scroll, 1 == Yes Vert scroll
- \comment @[1,8] = 0 == No Hort scroll, 1 == Yes Hort scroll
- \comment @[1,9] = 0 == No System Menu, 1 == Yes System Menu
- \comment @[1,10] = 0 == No Maximize box, 1 == Yes Maximize box
- \comment @[1,11] = 0 == No Minimize box, 1 == Yes Minimize box
- \comment
- \comment @[1,12] = 0 == No Background color, 1 == Yes Background color
- \comment @[1,62] = Background color #
- \comment @[2,62] = Background color Text
- \comment
- \comment @[1,17] = 0 == No Mouse proc, 1 == Yes Mouse proc
- \comment @[1,18] = 0 == No Char proc , 1 == Yes Char proc
- \comment @[1,19] = 0 == No Timer proc, 1 == Yes Timer proc
- \comment
- \comment @[1,20] = 0 == small memory , 1 == medium memory
- \comment
- \comment @[4,1] = Total number of Dialog boxes
- \comment @[4,2] = Temp loop counter
- \comment @[4,3] = Total number of Modeless Dialog boxes
- \comment @[4,10] ... @[4,n] = Dialog Box names
- \comment @[5,10] ... @[5,n] = 1 == Modal, 2 == Modeless
- \comment
- \comment @[11,1] = Name of main menu item 1
- \comment @[11,2] = 0 = user code, 1 = modal, 2 = modeless
- \comment @[11,3] = name of called dialog box
- \comment @[11,10] = Number of sub menu items
- \comment @[11,11] = name of menu 1 sub menu 1
- \comment @[11,111] = 0 = user code, 1 = modal, 2 = modeless
- \comment @[11,211] = name of called dialog box
- \comment @[11,12] = name of menu 1 sub menu 2
- \comment @[11,13] = name of menu 1 sub menu 3
- \comment @[11,14] = name of menu 1 sub menu 4
- \comment @[11,15] = name of menu 1 sub menu 5
- \comment ...
- \comment
- \comment @[12,1] = Name of main menu item 2
- \comment @[12,10] = Number of sub menu items
- \comment @[12,11] = name of menu 2 sub menu 1
- \comment @[12,12] = name of menu 2 sub menu 2
- \comment @[12,13] = name of menu 2 sub menu 3
- \comment @[12,14] = name of menu 2 sub menu 4
- \comment @[12,15] = name of menu 2 sub menu 5
- \comment ...
- \comment
- \comment @[13,1] = Name of main menu item 3
- \comment @[14,1] = Name of main menu item 4
- \comment @[15,1] = Name of main menu item 5
- \comment @[16,1] = Name of main menu item 6
- \comment ...
- \comment
- \equ @[4,1] = 0
- \equ @[4,2] = 0
- \equ @[4,3] = 0
- \equ @[2,2] = '.
- \equ @[10,2] = 'NULL
- \wrline
- \wrline Windows 3.0 Application Generator (Version 1.00)
- \wrline
- \wrline (C) Copyright DEA Software 1990
- \wrline
- \wrline On questions that ask for a "1" for a positive response you
- \wrline can reply negatively with a "0" response.
- \wrline
- \rdtext @[1,1] : Enter Name of Window program (Max 8 chars)
- \rdtext @[2,1] : Enter Window Caption string
- \rdnum @[1,4] # 0, 1 : Enter a 1 if you have an Icon file :
- \comment load default Icon file name
- \equ @[1,40] = '
- \equ @[1,40] = @[1,1]
- \if @[1,4] = 1
- \rdtext @[1,40] : Enter Name of Icon file
- \rdnum @[1,5] # 0, 1 : Enter a 1 if to select a Cursor :
- \comment load default cursor id
- \equ @[2,50] = 'IDC_ARROW
- \if @[1,5] <> 1
- \skip 1
- \wrline Standard Cursors
- \wrline 0 == IDC_ARROW, 1 == IDC_IBEAM, 2 == IDC_WAIT
- \wrline 3 == IDC_CROSS, 4 == IDC_UPARROW, 5 == IDC_SIZE
- \wrline 6 == IDC_ICON,
- \rdnum @[1,50] # 0, 6 : Enter you cursor selection (0-6) :
- \if @[1,50] = 0
- \equ @[2,50] = 'IDC_ARROW
- \if @[1,50] = 1
- \equ @[2,50] = 'IDC_IBEAM
- \if @[1,50] = 2
- \equ @[2,50] = 'IDC_WAIT
- \if @[1,50] = 3
- \equ @[2,50] = 'IDC_CROSS
- \if @[1,50] = 4
- \equ @[2,50] = 'IDC_UPARROW
- \if @[1,50] = 5
- \equ @[2,50] = 'IDC_SIZE
- \if @[1,50] = 6
- \equ @[2,50] = 'IDC_ICON
- \eskip 1
- \rdnum @[1,63] # 0, 1 : Enter a 1 if you wish to set Window position :
- \if @[1,63] = 1
- \rdnum @[1,64] : Enter initial x position :
- \if @[1,63] = 1
- \rdnum @[1,65] : Enter initial y position :
- \if @[1,63] = 1
- \rdnum @[1,66] : Enter initial x size :
- \if @[1,63] = 1
- \rdnum @[1,67] : Enter initial y size :
- \rdnum @[1,7] # 0, 1 : Enter a 1 if you want Vertical scroll bars :
- \rdnum @[1,8] # 0, 1 : Enter a 1 if you want Hort scroll bars :
- \rdnum @[1,9] # 0, 1 : Enter a 1 if you want System Menu :
- \rdnum @[1,10] # 0, 1 : Enter a 1 if you want Maximize box :
- \rdnum @[1,11] # 0, 1 : Enter a 1 if you want Minimize box :
- \rdnum @[1,12] # 0, 1 : Enter a 1 if you want to set Background color :
- \comment load default background brush
- \equ @[2,62] = 'WHITE_BRUSH
- \if @[1,12] <> 1 : Skip if user does not want to set background color
- \skip 1
- \wrline Background Brush Colors
- \wrline 0 == WHITE_BRUSH, 1 == LTGRAY_BRUSH, 2 == GRAY_BRUSH
- \wrline 3 == DKGRAY_BRUSH, 4 == BLACK_BRUSH, 5 == NULL_BRUSH
- \rdnum @[1,62] # 0, 5 : Enter you brush selection (0-5) :
- \if @[1,62] = 0
- \equ @[2,62] = 'WHITE_BRUSH
- \if @[1,62] = 1
- \equ @[2,62] = 'LTGRAY_BRUSH
- \if @[1,62] = 2
- \equ @[2,62] = 'GRAY_BRUSH
- \if @[1,62] = 3
- \equ @[2,62] = 'DKGRAY_BRUSH
- \if @[1,62] = 4
- \equ @[2,62] = 'BLACK_BRUSH
- \if @[1,62] = 5
- \equ @[2,62] = 'NULL_BRUSH
- \eskip 1
- \rdnum @[1,20] # 0, 1 : Enter a 1 for Medium Model, or 0 if Small Model :
- \rdnum @[1,17] # 0, 1 : Enter a 1 if you want a Mouse support :
- \rdnum @[1,18] # 0, 1 : Enter a 1 if you want a Character input support :
- \rdnum @[1,19] # 0, 1 : Enter a 1 if you want a Timer procedure :
- \comment
- \comment Collect Menu items
- \comment
- \wrline *************************************************************
- \wrline * Section to design the pulldown menus for your application *
- \wrline *************************************************************
- \equ @[2,3] = 11
- \equ @[2,4] = 1
- \rdnum @[10,1] : Enter Number of Main Menu Items :
- \if @[10,1] > 0
- \loop @[10,1] menuitem.000
- \if @[10,1] > 0
- \equ @[10,2] = @[1,1] : Since we have menu items set Menu name to App name
- \comment \rdnum @[1,3] : Enter Number of Child Windows
- \comment \loop @[1,3] childwin.000
- \comment
- \comment This is where we generate the Windows source code
- \comment
- \comment output skeleton.h file
- \comment
- \output @[1,1]@[2,2]h
- /* --------------------------------------------- */
- /* MODIFY these defines to fit your Dialog Boxes */
- /* --------------------------------------------- */
- #define ID_OK 1
- #define ID_CANCEL 2
- \mask @[2,3]..@[2,7] = #####
- \npad @[2,3]..@[2,7]
- \equ @[2,3] = 1 : Starting Main Menu number
- \equ @[2,4] = 100 : Starting Main Menu IDM # defines
- \equ @[2,5] = 11 : Starting Sub Menu starting index
- \if @[10,1] > 0
- \loop @[10,1] menuitem.001
- \comment
- \comment skeleton.rc
- \comment
- \output @[1,1]@[2,2]rc
- #include <windows.h>
- #include "@[1,1]@[2,2]h"
- \space
- \if @[1,4] = 0
- \skip 1
- @[1,40] ICON @[1,40]@[2,2]ICO
- \eskip 1
- @[1,1] MENU
- \space
- BEGIN
- \equ @[2,3] = 1 : Starting Main Menu number
- \equ @[2,4] = 100 : Starting Main Menu IDM # defines
- \equ @[2,5] = 11 : Starting Sub Menu starting index
- \if @[10,1] > 0
- \loop @[10,1] menuitem.002
- END
- \comment declare all the Dialog Box Procedures
- \equ @[4,2] = 0
- \if @[4,1] > 0
- \loop @[4,1] dialog.002
- \comment
- \comment skeleton.def
- \comment
- \output @[1,1]@[2,2]def
- \equ @[2,15] = '@
- \equ @[2,3] = 1
- NAME @[1,1]
-
- EXETYPE WINDOWS
-
- STUB 'WINSTUB.EXE'
-
- CODE PRELOAD MOVEABLE DISCARDABLE
- DATA PRELOAD MOVEABLE MULTIPLE
-
- HEAPSIZE 4096
- STACKSIZE 5120
-
- ; All functions that will be called by any Windows routine
- ; MUST be exported.
-
- EXPORTS
- @[1,1]WindowProc @[2,15]@[2,3]
- \comment Export all the Dialog Box Procedures
- \equ @[4,2] = 0
- \if @[4,1] > 0
- \loop @[4,1] dialog.000
- \comment
- \comment skeleton make file
- \comment
- \output @[1,1]@[2,2]
- \if @[1,20] <> 0 : Small Memory Model
- \skip 1
- all: @[1,1]@[2,2]exe
-
- @[1,1]@[2,2]res : @[1,1]@[2,2]rc
- rc -r @[1,1]@[2,2]rc
-
- @[1,1]@[2,2]obj : @[1,1]@[2,2]c @[1,1]@[2,2]h
- cl -c -AS -Gsw -Oas -Zpe @[1,1]@[2,2]c
-
- @[1,1]@[2,2]exe : @[1,1]@[2,2]obj @[1,1]@[2,2]res @[1,1]@[2,2]def
- link /NOD @[1,1]@[2,2]obj, @[1,1], @[1,1]/map,libw slibcew,@[1,1]@[2,2]def
- mapsym @[1,1]
- rc @[1,1]@[2,2].res
- \eskip 1
- \if @[1,20] = 0 : Medium Memory Model
- \skip 1
- all: @[1,1]@[2,2]exe
-
- @[1,1]@[2,2]res : @[1,1]@[2,2]rc
- rc -r @[1,1]@[2,2]rc
-
- @[1,1]@[2,2]obj : @[1,1]@[2,2]c @[1,1]@[2,2]h
- cl -c -AM -Gsw -Oas -Zpe @[1,1]@[2,2]c
-
- @[1,1]@[2,2]exe : @[1,1]@[2,2]obj @[1,1]@[2,2]res @[1,1]@[2,2]def
- link /NOD @[1,1]@[2,2]obj, @[1,1], @[1,1]/map,libw mlibcew,@[1,1]@[2,2]def
- mapsym @[1,1]
- rc @[1,1]@[2,2].res
- \eskip 1
- \comment
- \comment skeleton.c
- \comment
- \output @[1,1]@[2,2]c
- /***************************************************************/
- /* @[1,1] */
- /***************************************************************/
-
- #include "Windows.h"
- #include "@[1,1]@[2,2]h"
-
- /********************************************************************/
- /* E X T E R N A L V A R I A B L E S */
- /********************************************************************/
-
- /* User data to be passed from first instance to other instances */
- typedef struct
- {
- int dummy;
- } SETUPDATA;
-
- SETUPDATA SetUpData;
-
- HANDLE hInst; /* Data that can be referenced */
- /* throughout the program, but is not */
- /* normally passed to other instances.*/
-
- /********************************************************************/
- /* F O R W A R D R E F E R E N C E S */
- /********************************************************************/
-
- void Init@[1,1] (HANDLE, HANDLE, int);
- void Init@[1,1]First (HANDLE);
- void Init@[1,1]Added (HANDLE, HANDLE);
- void Init@[1,1]Every (HANDLE, int);
- void Close@[1,1] (HANDLE);
- void Paint@[1,1]Window (HWND);
- \if @[1,17] = 0
- \skip 1
- void @[1,1]TrackMouseProc (HWND, unsigned, POINT);
- \eskip 1
- \if @[1,7] = 0
- \skip 1
- void @[1,1]VertScrollProc (HWND, WORD);
- \eskip 1
- \if @[1,8] = 0
- \skip 1
- void @[1,1]HorizScrollProc (HWND, WORD);
- \eskip 1
- \comment declare all the Dialog Box Procedures
- \equ @[4,2] = 0
- \if @[4,1] > 0
- \loop @[4,1] dialog.001
-
- long FAR PASCAL @[1,1]WindowProc (HWND, unsigned, WORD, LONG);
-
- /********************************************************************/
- /* G L O B A L V A R I A B L E S */
- /********************************************************************/
-
- char szAppName [] = "@[1,1]";
- HWND ghWnd; /* Global Handle to the Window */
- \if @[4,3] = 0
- \skip 1
-
- /* This code supports only ONE Modeless dialog box at a time */
- /* in order to start another Modeless dialog box you must stop */
- /* the current one. Use DestroyWindow function to terminate a */
- /* Modeless dialog box. */
-
- HWND hDlgModeless; /* Handle to a Modeless dialog box */
- \eskip 1
-
-
- /********************************************************************/
- /* M A I N P R O C E D U R E */
- /********************************************************************/
-
- int PASCAL WinMain (hInstance, hPrevInstance, lpszCmdLine, cmdShow)
-
- HANDLE hInstance;
- HANDLE hPrevInstance;
- LPSTR lpszCmdLine; /* Command line */
- int cmdShow; /* Window open or iconic at start */
-
- {
- MSG msg; /* Temp buffer to hold message */
- HANDLE hAccel; /* Handle to the accelerator table */
-
- /* Initialization routine */
- Init@[1,1] (hInstance, hPrevInstance, cmdShow);
- \if @[4,3] = 0
- \skip 1
-
- /* This code supports only ONE Modeless dialog box at a time */
- /* in order to start another Modeless dialog box you must stop */
- /* the current one. Use DestroyWindow function to terminate a */
- /* Modeless dialog box. */
-
- hDlgModeless = NULL;
- \eskip 1
-
- hAccel = LoadAccelerators (hInstance, szAppName);
-
- /* main window loop */
- while (GetMessage(&msg, NULL, 0, 0)) /* Terminated by quit msg */
- {
- \if @[4,3] = 0
- \skip 1
- if (hDlgModeless == NULL || !IsDialogMessage (hDlgModeless, &msg))
- {
- \eskip 1
- if (!TranslateAccelerator (ghWnd, hAccel, &msg))
- {
- TranslateMessage(&msg); /* Translate virtual keys */
- DispatchMessage(&msg); /* Have Windows give msg */
- } /* to the window proc */
- \if @[4,3] = 0
- \skip 1
- }
- \eskip 1
- }
-
- /* Closing routine */
- Close@[1,1] (hInstance);
-
- return (msg.wParam);
-
- } /* WinMain END */
-
-
- /********************************************************************/
- /* I N I T I A L I Z A T I O N */
- /********************************************************************/
-
- void Init@[1,1] (hInstance, hPrevInstance, cmdShow)
-
- HANDLE hInstance, hPrevInstance;
- int cmdShow;
- {
- if (!hPrevInstance)
- /* Initialize first instance only */
- Init@[1,1]First (hInstance);
- else
- /* Initialize additional instances */
- Init@[1,1]Added (hInstance, hPrevInstance);
-
- /* Initialize all instances. */
- Init@[1,1]Every (hInstance, cmdShow);
-
- } /* Init@[1,1] END */
-
-
- /********************************************************************/
- /* F I R S T - I N S T A N C E I N I T I A L I Z A T I O N */
- /********************************************************************/
-
- /* Done only once, regardless of the number of instances running */
- /* Register the window class(es). */
- /* Create the objects, bitmaps, and metafiles that are to be used */
- /* by all instances of this application. */
-
- void Init@[1,1]First (hInstance)
-
- HANDLE hInstance;
- {
- WNDCLASS wc@[1,1]Class;
-
- /* Fill it with window class information. */
- wc@[1,1]Class.lpszClassName = "@[1,1]";
- wc@[1,1]Class.hInstance = hInstance;
- wc@[1,1]Class.lpfnWndProc = @[1,1]WindowProc;
- wc@[1,1]Class.hCursor = LoadCursor (NULL, @[2,50]);
- wc@[1,1]Class.hIcon = LoadIcon (hInstance, "@[1,40]");
- \if @[10,1] = 0
- \skip 1 : if no Menu items then do not load a menu
- wc@[1,1]Class.lpszMenuName = "@[10,2]";
- \eskip 1
- \if @[10,1] > 0
- \skip 1
- wc@[1,1]Class.lpszMenuName = NULL;
- \eskip 1
- wc@[1,1]Class.hbrBackground = GetStockObject (@[2,62]);
- wc@[1,1]Class.style = CS_HREDRAW | CS_VREDRAW;
- wc@[1,1]Class.cbClsExtra = 0;
- wc@[1,1]Class.cbWndExtra = 0;
-
- /* Register the class. */
- RegisterClass (&wc@[1,1]Class);
-
- } /* Init@[1,1]First END */
-
-
- /********************************************************************/
- /* A D D E D - I N S T A N C E I N I T I A L I Z A T I O N */
- /********************************************************************/
-
- /* Done for every instance other than the first. */
- /* Copy the results of the previous instance's initialization */
-
- void Init@[1,1]Added (hInstance, hPrevInstance)
-
- HANDLE hInstance, hPrevInstance;
- {
- /* Get the results of the previous initialization.*/
- GetInstanceData (hPrevInstance, (PSTR)&SetUpData, sizeof(SETUPDATA));
-
- } /* Init@[1,1]Added END */
-
-
- /*********************************************************************/
- /* E V E R Y - I N S T A N C E I N I T I A L I Z A T I O N */
- /*********************************************************************/
-
- /* Done once for each instance of the application. */
- /* Create the window. (Cause an instance of the window to exist) */
- /* Show the window. (Cause the window to be drawn on the screen) */
- /* Update the window. (Cause your paint procedure to be executed) */
-
- void Init@[1,1]Every (hInstance, cmdShow)
-
- HANDLE hInstance;
- int cmdShow;
- {
-
- /* Save the hInstance so that your window procs can use it */
- hInst = hInstance;
-
- ghWnd = CreateWindow(
- "@[1,1]", /* Window class name. */
- "@[2,1]", /* Window title. */
- \if @[1,7] <> 1 : Vert Scroll
- \skip 1
- WS_VSCROLL |
- \eskip 1
- \if @[1,8] <> 1 : Hort Scroll
- \skip 1
- WS_HSCROLL |
- \eskip 1
- \if @[1,9] <> 1 : System Menu
- \skip 1
- WS_SYSMENU |
- \eskip 1
- \if @[1,10] <> 1 : Maximize box
- \skip 1
- WS_MAXIMIZEBOX |
- \eskip 1
- \if @[1,11] <> 1 : Minimize box
- \skip 1
- WS_MINIMIZEBOX |
- \eskip 1
- WS_OVERLAPPEDWINDOW , /* Type of window. */
- \if @[1,63] <> 0 : Use default location and size
- \skip 1
- CW_USEDEFAULT, /* x - default location. */
- 0, /* y */
- CW_USEDEFAULT, /* cx - default size. */
- 0, /* cy */
- \eskip 1
- \if @[1,63] <> 1 : Use user specified location and size
- \skip 1
- \mask @[1,64]..@[1,67] = ######
- \pad @[1,64]..@[1.67]
- @[1,64], /* x - location */
- @[1,65], /* y */
- @[1,66], /* cx - size */
- @[1,67], /* cy */
- \eskip 1
- NULL, /* No parent for this wind. */
- NULL, /* Use the class menu. */
- hInstance, /* Who created this window. */
- NULL /* No params to pass on. */
- );
-
- /* Display this window on the screen. */
- ShowWindow (ghWnd, cmdShow);
-
- /* Paint the client area. */
- UpdateWindow (ghWnd);
-
- } /* Init@[1,1]Every END */
-
-
- /*******************************************************************/
- /* C L O S I N G R O U T I N E */
- /*******************************************************************/
-
- void Close@[1,1] (hInstance)
-
- HANDLE hInstance;
- {
- } /* Close@[1,1] END */
-
- \if @[1,17] = 0
- \skip 1
-
- /*******************************************************************/
- /* M O U S E R O U T I N E */
- /*******************************************************************/
-
- void @[1,1]TrackMouseProc (hWnd, message, Point)
-
- HWND hWnd; /* Handle of the window. */
- unsigned message; /* Message type. */
- POINT Point; /* Coordinates of mouse cursor. */
-
- {
- switch (message)
- {
- case WM_MOUSEMOVE:
- break;
-
- case WM_LBUTTONDOWN:
- break;
-
- case WM_RBUTTONDOWN:
- break;
-
- case WM_LBUTTONDBLCLK:
- break;
-
- case WM_RBUTTONDBLCLK:
- break;
-
- case WM_LBUTTONUP:
- break;
-
- case WM_RBUTTONUP:
- break;
-
- default:
- return;
- }
- } /* @[1,1]TrackMouseProc END */
- \eskip 1
-
- \if @[1,7] = 0
- \skip 1
-
- /*******************************************************************/
- /* V E R T I C A L S C R O L L R O U T I N E */
- /*******************************************************************/
-
- void @[1,1]VertScrollProc (hWnd, wParam)
-
- HWND hWnd;
- WORD wParam;
-
- {
- /* --------------------------------------------------- */
- /* ADD your code here to process Vertical scrolling */
- /* --------------------------------------------------- */
-
- switch (wParam)
- {
- case SB_TOP:
- break ;
-
- case SB_BOTTOM:
- break ;
-
- case SB_LINEUP:
- break ;
-
- case SB_LINEDOWN:
- break ;
-
- case SB_PAGEUP:
- break ;
-
- case SB_PAGEDOWN:
- break ;
-
- case SB_THUMBTRACK:
- break ;
-
- default:
- break;
- }
-
- } /* @[1,1]VertScrollProc END */
-
- \eskip 1
- \if @[1,8] = 0
- \skip 1
-
- /*******************************************************************/
- /* H O R I Z O N T A L S C R O L L R O U T I N E */
- /*******************************************************************/
-
- void @[1,1]HorizScrollProc (hWnd, wParam)
-
- HWND hWnd;
- WORD wParam;
-
- {
-
- /* --------------------------------------------------- */
- /* ADD your code here to process Horizontal scrolling */
- /* --------------------------------------------------- */
- switch (wParam)
- {
- case SB_LINEUP:
- break ;
-
- case SB_LINEDOWN:
- break ;
-
- case SB_PAGEUP:
- break ;
-
- case SB_PAGEDOWN:
- break ;
-
- case SB_THUMBPOSITION:
- break ;
-
- default:
- break;
- }
-
- } /* @[1,1]HorizScrollProc END */
-
- \eskip 1
-
- /*********************************************************************/
- /* P A I N T R O U T I N E */
- /*********************************************************************/
-
- void Paint@[1,1]Window (hWnd)
-
- HWND hWnd; /* Handle of the window */
- {
- PAINTSTRUCT ps; /* Used for painting */
- HDC hDC;
-
- hDC = BeginPaint (hWnd, &ps);
-
- /* ------------------------------------------------------- */
- /* ADD your paint code that outputs to the client area */
- /* ------------------------------------------------------- */
-
- EndPaint (hWnd, &ps);
-
- } /* Paint@[1,1]Window END */
-
-
- /*********************************************************************/
- /* W I N D O W P R O C E D U R E */
- /*********************************************************************/
-
- long FAR PASCAL @[1,1]WindowProc (hWnd, message, wParam, lParam)
-
- HWND hWnd; /* Handle of the window. */
- unsigned message; /* Message type. */
- WORD wParam; /* Message 16-bit param. */
- LONG lParam; /* Message 32-bit param. */
- {
- \if @[4,1] = 0
- \skip 1
- FARPROC lpfnDlgProc;
- \eskip 1
-
- switch (message)
- {
- \if @[1,17] = 0
- \skip 1
- case WM_MOUSEMOVE:
- case WM_LBUTTONDOWN:
- case WM_RBUTTONDOWN:
- case WM_LBUTTONUP:
- case WM_RBUTTONUP:
- case WM_LBUTTONDBLCLK:
- case WM_RBUTTONDBLCLK:
- @[1,1]TrackMouseProc (hWnd, message, MAKEPOINT(lParam));
- break;
- \eskip 1
-
- case WM_COMMAND:
-
- switch (wParam)
- {
- \equ @[2,3] = 1 : Starting Main Menu number
- \equ @[2,4] = 100 : Starting Main Menu IDM # defines
- \equ @[2,5] = 11 : Starting Sub Menu starting index
- \if @[10,1] > 0
- \loop @[10,1] menuitem.003
- default :
- break;
- }
- break;
-
- case WM_CREATE:
- break;
-
- case WM_SIZE:
- break;
-
- \if @[1,7] = 0
- \skip 1
- case WM_VSCROLL:
-
- /* Process Vertical scrolling */
-
- @[1,1]VertScrollProc (hWnd, wParam);
- break;
-
- \eskip 1
- \if @[1,8] = 0
- \skip 1
- case WM_HSCROLL:
-
- /* Process Horizontal scrolling */
-
- @[1,1]HorizScrollProc (hWnd, wParam);
- break;
-
- \eskip 1
- case WM_PAINT:
-
- /* Redraw the client area */
-
- Paint@[1,1]Window (hWnd);
- break;
-
- case WM_DESTROY:
-
- /* Destroy the Window */
-
- PostQuitMessage(0);
- break;
-
- default:
- return(DefWindowProc(hWnd, message, wParam, lParam));
- break;
- }
- return(0L);
- } /* @[1,1]WindowProc END */
-
- /*****************************************************************/
- /* D I A L O G B O X R O U T I N E S */
- /*****************************************************************/
-
- \equ @[4,2] = 0
- \if @[4,1] > 0
- \loop @[4,1] dialog.003
- \wrline
- \wrline
- \wrline
- \wrline Windows 3.0 application generation completed
- \wrline
- \wrline
- \wrline
- \wrline
- \wrline