Annotation of os232sdk/toolkt20/c/samples/template/dlg.c, revision 1.1

1.1     ! root        1: /*==============================================================*\
        !             2:  *  Dlg.c - window procedures for the dialog boxes as well
        !             3:  *              as utility procedures used by them
        !             4:  *      Created 1989, 1990  Microsoft Corp.
        !             5:  *--------------------------------------------------------------
        !             6:  *
        !             7:  *  This module contains the Dialog Procedures for the user
        !             8:  *  defined dialogs as well as any support code they need
        !             9:  *
        !            10:  *--------------------------------------------------------------
        !            11:  *
        !            12:  *  This source file contains the following functions:
        !            13:  *
        !            14:  *           AboutBoxDlgProc(hwnd, msg, mp1, mp2)
        !            15:  *
        !            16: \*==============================================================*/
        !            17: 
        !            18: /*--------------------------------------------------------------*\
        !            19:  *  Include files, macros, defined constants, and externs
        !            20: \*--------------------------------------------------------------*/
        !            21: 
        !            22: #include <os2.h>
        !            23: #include <string.h>
        !            24: #include "main.h"
        !            25: #include "dlg.h"
        !            26: #include "xtrn.h"
        !            27: 
        !            28: 
        !            29: /*--------------------------------------------------------------*\
        !            30:  *  Global variables
        !            31: \*--------------------------------------------------------------*/
        !            32: 
        !            33: 
        !            34: /*--------------------------------------------------------------*\
        !            35:  *  Entry point declarations
        !            36: \*--------------------------------------------------------------*/
        !            37: 
        !            38: MRESULT EXPENTRY AboutBoxDlgProc(HWND hwnd, USHORT msg,
        !            39:                                   MPARAM mp1, MPARAM mp2);
        !            40: 
        !            41: /****************************************************************\
        !            42:  *  Dialog procedure for the About dialog box
        !            43:  *--------------------------------------------------------------
        !            44:  *
        !            45:  *  Name:   AboutBoxDlgProc(hwnd, msg, mp1, mp2)
        !            46:  *
        !            47:  *  Purpose: Processes all messages sent to the About Box
        !            48:  *
        !            49:  *  Usage:  Called for each message sent to the About Box
        !            50:  *          dialog box.
        !            51:  *
        !            52:  *  Method: the about box only has a button control so this
        !            53:  *          routine only processes WM_COMMAND messages.  Any
        !            54:  *          WM_COMMAND posted must have come from the Ok
        !            55:  *          button so we dismiss the dialog upon receiving it.
        !            56:  *
        !            57:  *  Returns: Dependent upon message sent
        !            58:  *
        !            59: \****************************************************************/
        !            60: MRESULT EXPENTRY AboutBoxDlgProc(hwnd, msg, mp1, mp2)
        !            61: HWND hwnd;      /* handle of window */
        !            62: USHORT msg;     /* id of message */
        !            63: MPARAM mp1;     /* first message parameter */
        !            64: MPARAM mp2;     /* second message parameter */
        !            65: {
        !            66:     switch(msg)  {
        !            67:         case WM_COMMAND:
        !            68:             /* no matter what the command, close the dialog */
        !            69:             WinDismissDlg(hwnd, TRUE);
        !            70:             break;
        !            71: 
        !            72:         default:
        !            73:             return(WinDefDlgProc(hwnd, msg, mp1, mp2));
        !            74:             break;
        !            75:     }
        !            76: 
        !            77:     return 0L;
        !            78: 
        !            79: }   /* AboutBoxWndProc() */

unix.superglobalmegacorp.com

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