Annotation of pmsdk/samples/template/tempinit.c, revision 1.1

1.1     ! root        1: /****************************** Module Header ******************************\
        !             2: * Module Name: tempinit.c
        !             3: *
        !             4: *     Initialization portion of Presentation Manager Template Application
        !             5: *
        !             6: * Created by Microsoft Corp., 1988
        !             7: *
        !             8: \***************************************************************************/
        !             9: 
        !            10: #define INCL_WINCOMMON
        !            11: #define INCL_WINMESSAGEMGR
        !            12: #include <os2.h>
        !            13: #include "template.h"
        !            14: 
        !            15: extern HAB     hAB;
        !            16: extern HMQ     hMsgQ;
        !            17: extern HWND    hwndTemplate;
        !            18: extern HWND    hwndTemplateFrame;
        !            19: 
        !            20: /***************************** Private Function ****************************\
        !            21: *
        !            22: * BOOL FAR TemplateInitApp( )
        !            23: *
        !            24: * Effects:  Registers Application Window Class
        !            25: *           Creates Standard Window
        !            26: *
        !            27: * Warnings: None
        !            28: *
        !            29: * History:
        !            30: *  01-Jun-87 by rickd  Converted to new API
        !            31: \***************************************************************************/
        !            32: 
        !            33: BOOL FAR TemplateInitApp( VOID )
        !            34: {
        !            35:     char szTitle[21];
        !            36:     ULONG ctldata;
        !            37: 
        !            38:     /*  Register Application Window Class  */
        !            39: 
        !            40:     if ( !WinRegisterClass( hAB, (PCH)"Template", (PFNWP)TemplateWndProc,
        !            41:             CS_SYNCPAINT, 0 ) )
        !            42:         return( FALSE );
        !            43: 
        !            44: 
        !            45:     /* Create a window instance of class "Template" */
        !            46: 
        !            47:     WinLoadString( hAB, NULL, IDSTITLE, sizeof(szTitle), (PCH)szTitle );
        !            48:    
        !            49:     ctldata = FCF_STANDARD;
        !            50: 
        !            51:     hwndTemplateFrame = WinCreateStdWindow(
        !            52:         HWND_DESKTOP,   /* specify desktop as parent window                */
        !            53:                         /* window styles                                   */
        !            54:         WS_VISIBLE | FS_ICON | FS_ACCELTABLE,
        !            55:         &ctldata,       /* frame creation flags                            */
        !            56:         (PCH)"Template",/* window class name                               */
        !            57:         (PCH)szTitle,   /* name appearing in window caption                */
        !            58:         0L,              /*                                                 */
        !            59:         (HMODULE)NULL,   /*  use current executable module id               */
        !            60:         ID_TEMPLATE,     /*  menu id + accelerator id + icon id             */
        !            61:         (HWND FAR *)&hwndTemplate  /* window handle                         */
        !            62:         );
        !            63: 
        !            64:     return( TRUE );
        !            65: }

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.