Annotation of os232sdk/toolkt20/c/samples/image/img_dlg.c, revision 1.1

1.1     ! root        1: /*==============================================================*\
        !             2:  *  img_dlg.c - routines for the application dialogs
        !             3:  *      Created 1989, 1990 IBM, Microsoft Corp.
        !             4:  *--------------------------------------------------------------*
        !             5:  *
        !             6:  *  This module contains the code for handling the Color and About
        !             7:  *  dialog boxes.
        !             8:  *
        !             9:  *--------------------------------------------------------------*
        !            10:  *
        !            11:  *  This source file contains the following functions:
        !            12:  *
        !            13:  *      AboutDlgProc(hwnd, msg, mp1, mp2)
        !            14:  *
        !            15: \*==============================================================*/
        !            16: /*--------------------------------------------------------------*\
        !            17:  *  Include files, macros, defined constants, and externs       *
        !            18: \*--------------------------------------------------------------*/
        !            19: 
        !            20: #include <os2.h>
        !            21: #include <string.h>
        !            22: #include "img_main.h"
        !            23: #include "img_xtrn.h"
        !            24: #include "img_dlg.h"
        !            25: 
        !            26: /****************************************************************\
        !            27:  *  Dialog procedure for the About dialog box                   *
        !            28:  *--------------------------------------------------------------*
        !            29:  *                                                              *
        !            30:  *  Name:   AboutBoxDlgProc(hdlg, msg, mp1, mp2)                *
        !            31:  *                                                              *
        !            32:  *  Purpose: Processes all messages sent to the About Box       *
        !            33:  *                                                              *
        !            34:  *  Usage:  Called for each message sent to the About Box       *
        !            35:  *          dialog box.
        !            36:  *                                                              *
        !            37:  *  Method: the about box only has a button control so this     *
        !            38:  *          routine only processes WM_COMMAND messages.  Any    *
        !            39:  *          WM_COMMAND posted must have come from the Ok        *
        !            40:  *          button so we dismiss the dialog upon receiving it.  *
        !            41:  *                                                              *
        !            42:  *  Returns: Dependent upon message sent                        *
        !            43:  *                                                              *
        !            44: \****************************************************************/
        !            45: MRESULT EXPENTRY AboutBoxDlgProc(hdlg, msg, mp1, mp2)
        !            46: HWND hdlg;      /* handle of window */
        !            47: USHORT msg;     /* id of message */
        !            48: MPARAM mp1;     /* first message parameter */
        !            49: MPARAM mp2;     /* second message parameter */
        !            50: {
        !            51:     switch(msg)  {
        !            52:         case WM_COMMAND:
        !            53:             /* no matter what the command, close the dialog */
        !            54:             WinDismissDlg(hdlg, TRUE);
        !            55:             break;
        !            56: 
        !            57:         default:
        !            58:             return(WinDefDlgProc(hdlg, msg, mp1, mp2));
        !            59:             break;
        !            60:     }
        !            61: 
        !            62:     return 0L;
        !            63: 
        !            64: }   /* AboutBoxDlgProc() */

unix.superglobalmegacorp.com

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