Annotation of mstools/ole20/samples/gizmobar/gizmo.h, revision 1.1

1.1     ! root        1: /*
        !             2:  * GIZMO.H
        !             3:  * GizmoBar Version 1.00, March 1993
        !             4:  *
        !             5:  * Data structure and type definitions for the GIZMO data structure.  Each
        !             6:  * gizmo on a gizmobar has one of these structures associated with it.
        !             7:  *
        !             8:  * Copyright (c)1992 Microsoft Corporation, All Rights Reserved
        !             9:  *
        !            10:  * Kraig Brockschmidt, Software Design Engineer
        !            11:  * Microsoft Systems Developer Relations
        !            12:  *
        !            13:  * Internet  :  [email protected]
        !            14:  * Compuserve:  >INTERNET:[email protected]
        !            15:  */
        !            16: 
        !            17: 
        !            18: #ifndef _GIZMO_H_
        !            19: #define _GIZMO_H_
        !            20: 
        !            21: #ifdef __cplusplus
        !            22: extern "C"
        !            23:     {
        !            24: #endif
        !            25: 
        !            26: 
        !            27: typedef struct tagGIZMO
        !            28:     {
        !            29:     struct tagGIZMO FAR *pPrev;
        !            30:     struct tagGIZMO FAR *pNext;
        !            31:     UINT                 iType;
        !            32:     HWND                 hWnd;       //Texts, edits, lists, and combos only.
        !            33:     UINT                 uID;
        !            34:     UINT                 x, y;
        !            35:     UINT                 dx, dy;
        !            36:     UINT                 cxImage;    //From UIToolConfigureForDisplay
        !            37:     UINT                 cyImage;
        !            38:     HBITMAP              hBmp;       //Buttons only.
        !            39:     UINT                 iBmp;
        !            40:     BOOL                 fNotify;    //Indicates whether we send WM_COMMANDs
        !            41:     BOOL                 fHidden;    //Independent of state
        !            42:     BOOL                 fDisabled;
        !            43:     UINT                 uState;
        !            44:     UINT                 uStateOrg;
        !            45:     DWORD                dwData;     //Application-supplied data.
        !            46:     } GIZMO, FAR *PGIZMO;
        !            47: 
        !            48: typedef PGIZMO FAR *PPGIZMO;
        !            49: #define CBGIZMO sizeof(GIZMO)
        !            50: 
        !            51: //Property name we attach to controls in a gizmo to identify control type
        !            52: #define SZTYPEPROP      "iType"
        !            53: 
        !            54: //Number of controls we subclass
        !            55: #define CSUBGIZMOS       4
        !            56: 
        !            57: //ID of edit controls in comboboxes
        !            58: #define ID_COMBOEDIT     1001
        !            59: 
        !            60: 
        !            61: /*
        !            62:  * Conversion of iType (a positioned bit) into its position.
        !            63:  * The BITPOSITION macro does not need to be fast because we only
        !            64:  * use it once when creating a gizmo.  POSITIONBIT does, however, since
        !            65:  * we use it in subclass procedures.
        !            66:  */
        !            67: #define BITPOSITION(i, j)  {int k=i; for (j=0; k>>=1; j++);}
        !            68: #define POSITIONBIT(i)     (1 << i)
        !            69: 
        !            70: //Control classifications.  GIZMOBAR.H must be included first.
        !            71: #define GIZMOTYPE_WINDOWS           (GIZMOTYPE_TEXT | GIZMOTYPE_EDIT | GIZMOTYPE_LISTBOX | GIZMOTYPE_COMBOBOX | GIZMOTYPE_BUTTONNORMAL)
        !            72: #define GIZMOTYPE_BUTTONS           (GIZMOTYPE_BUTTONATTRIBUTEIN | GIZMOTYPE_BUTTONATTRIBUTEEX | GIZMOTYPE_BUTTONCOMMAND | GIZMOTYPE_BUTTONNORMAL)
        !            73: #define GIZMOTYPE_DRAWN             (GIZMOTYPE_BUTTONATTRIBUTEIN | GIZMOTYPE_BUTTONATTRIBUTEEX | GIZMOTYPE_BUTTONCOMMAND)
        !            74: 
        !            75: 
        !            76: //These must stay in sync with GIZMOBAR.H
        !            77: #define GIZMOTYPE_MIN               GIZMOTYPE_EDIT
        !            78: #define GIZMOTYPE_MAX               GIZMOTYPE_BUTTONCOMMAND
        !            79: 
        !            80: 
        !            81: //Enumeration callback
        !            82: typedef BOOL (FAR PASCAL *PFNGIZMOENUM)(PGIZMO, UINT, DWORD);
        !            83: 
        !            84: 
        !            85: //GIZMO.C
        !            86: PGIZMO   GizmoPAllocate(LPINT, PPGIZMO, HWND, UINT, UINT, UINT, UINT, UINT, LPSTR, HBITMAP, UINT, UINT);
        !            87: void     GizmosExpand(PGIZMO);
        !            88: PGIZMO   GizmoPFree(PPGIZMO, PGIZMO);
        !            89: void     GizmosCompact(PGIZMO);
        !            90: PGIZMO   GizmoPFind(PPGIZMO, UINT);
        !            91: PGIZMO   GizmoPEnum(PPGIZMO, PFNGIZMOENUM, DWORD);
        !            92: UINT     GizmoPStateSet(HWND, PGIZMO, UINT);
        !            93: BOOL     GizmoPCheck(HWND, PGIZMO, BOOL);
        !            94: 
        !            95: 
        !            96: LRESULT FAR PASCAL EXPORT GenericSubProc(HWND, UINT, WPARAM, LPARAM);
        !            97: 
        !            98: 
        !            99: #ifdef __cplusplus
        !           100:     }
        !           101: #endif
        !           102: 
        !           103: #endif //_GIZMO_H_

unix.superglobalmegacorp.com

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