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

1.1     ! root        1: /*
        !             2:  * GIZMOBAR.H
        !             3:  * GizmoBar Version 1.00, March 1993
        !             4:  *
        !             5:  * Public definitions for application that use the GizmoBar such as
        !             6:  * messages, prototypes for API functions, notification codes, and
        !             7:  * control styles.
        !             8:  *
        !             9:  * Copyright (c)1992 Microsoft Corporation, All Rights Reserved
        !            10:  *
        !            11:  * Kraig Brockschmidt, Software Design Engineer
        !            12:  * Microsoft Systems Developer Relations
        !            13:  *
        !            14:  * Internet  :  [email protected]
        !            15:  * Compuserve:  >INTERNET:[email protected]
        !            16:  */
        !            17: 
        !            18: 
        !            19: #ifndef _GIZMOBAR_H_
        !            20: #define _GIZMOBAR_H_
        !            21: 
        !            22: #ifdef __cplusplus
        !            23: extern "C"
        !            24:     {
        !            25: #endif
        !            26: 
        !            27: 
        !            28: //Classname
        !            29: #define CLASS_GIZMOBAR  "gizmobar"
        !            30: 
        !            31: 
        !            32: //Message API Functions
        !            33: HWND    WINAPI GBHwndAssociateSet(HWND, HWND);
        !            34: HWND    WINAPI GBHwndAssociateGet(HWND);
        !            35: 
        !            36: BOOL    WINAPI GBGizmoAdd(HWND, UINT, UINT, UINT, UINT, UINT, LPSTR, HBITMAP, UINT, UINT);
        !            37: BOOL    WINAPI GBGizmoRemove(HWND, UINT);
        !            38: 
        !            39: LRESULT WINAPI GBGizmoSendMessage(HWND, UINT, UINT, WPARAM, LPARAM);
        !            40: 
        !            41: BOOL    WINAPI GBGizmoShow(HWND, UINT, BOOL);
        !            42: BOOL    WINAPI GBGizmoEnable(HWND, UINT, BOOL);
        !            43: BOOL    WINAPI GBGizmoCheck(HWND, UINT, BOOL);
        !            44: UINT    WINAPI GBGizmoFocusSet(HWND, UINT);
        !            45: BOOL    WINAPI GBGizmoExist(HWND, UINT);
        !            46: 
        !            47: int     WINAPI GBGizmoTypeGet(HWND, UINT);
        !            48: 
        !            49: DWORD   WINAPI GBGizmoDataSet(HWND, UINT, DWORD);
        !            50: DWORD   WINAPI GBGizmoDataGet(HWND, UINT);
        !            51: BOOL    WINAPI GBGizmoNotifySet(HWND, UINT, BOOL);
        !            52: BOOL    WINAPI GBGizmoNotifyGet(HWND, UINT);
        !            53: 
        !            54: int     WINAPI GBGizmoTextGet(HWND, UINT, LPSTR, UINT);
        !            55: void    WINAPI GBGizmoTextSet(HWND, UINT, LPSTR);
        !            56: UINT    WINAPI GBGizmoIntGet(HWND, UINT, BOOL FAR *, BOOL);
        !            57: void    WINAPI GBGizmoIntSet(HWND, UINT, UINT, BOOL);
        !            58: 
        !            59: 
        !            60: 
        !            61: //Notification codes sent via WM_COMMAND from GBHwndAssociateSet
        !            62: #define GBN_ASSOCIATEGAIN               1
        !            63: #define GBN_ASSOCIATELOSS               2
        !            64: #define GBN_GIZMOADDED                  3
        !            65: #define GBN_GIZMOREMOVED                4
        !            66: 
        !            67: //Message equivalents for functions.
        !            68: #define GBM_HWNDASSOCIATESET            (WM_USER+0)
        !            69: #define GBM_HWNDASSOCIATEGET            (WM_USER+1)
        !            70: #define GBM_GIZMOADD                    (WM_USER+2)
        !            71: #define GBM_GIZMOREMOVE                 (WM_USER+3)
        !            72: #define GBM_GIZMOSENDMESSAGE            (WM_USER+4)
        !            73: #define GBM_GIZMOSHOW                   (WM_USER+5)
        !            74: #define GBM_GIZMOENABLE                 (WM_USER+6)
        !            75: #define GBM_GIZMOCHECK                  (WM_USER+7)
        !            76: #define GBM_GIZMOFOCUSSET               (WM_USER+8)
        !            77: #define GBM_GIZMOEXIST                  (WM_USER+9)
        !            78: #define GBM_GIZMOTYPEGET                (WM_USER+10)
        !            79: #define GBM_GIZMODATASET                (WM_USER+11)
        !            80: #define GBM_GIZMODATAGET                (WM_USER+12)
        !            81: #define GBM_GIZMONOTIFYSET              (WM_USER+13)
        !            82: #define GBM_GIZMONOTIFYGET              (WM_USER+14)
        !            83: #define GBM_GIZMOTEXTGET                (WM_USER+15)
        !            84: #define GBM_GIZMOTEXTSET                (WM_USER+16)
        !            85: #define GBM_GIZMOINTGET                 (WM_USER+17)
        !            86: #define GBM_GIZMOINTSET                 (WM_USER+18)
        !            87: 
        !            88: 
        !            89: 
        !            90: 
        !            91: /*
        !            92:  * Structure passed in lParam of GBM_GIZMOADD that mirrors the parameters
        !            93:  * to GBGizmoAdd.
        !            94:  */
        !            95: 
        !            96: typedef struct
        !            97:     {
        !            98:     HWND        hWndParent;         //Parent window
        !            99:     UINT        iType;              //Type of gizmo
        !           100:     UINT        iGizmo;             //Position in which to create gizmo
        !           101:     UINT        uID;                //Identifier of gizmo (for WM_COMMAND messages)
        !           102:     UINT        dx;                 //Dimensions of gizmo
        !           103:     UINT        dy;
        !           104:     LPSTR       pszText;            //Gizmo text
        !           105:     HBITMAP     hBmp;               //Source of gizmo button image.
        !           106:     UINT        iImage;             //Index of image from hBmp
        !           107:     UINT        uState;             //Initial state of the gizmo.
        !           108:     } CREATEGIZMO, FAR *PCREATEGIZMO;
        !           109: 
        !           110: #define CBCREATEGIZMO sizeof(CREATEGIZMO)
        !           111: 
        !           112: 
        !           113: //For GBM_GIZMOSENDMESSAGE
        !           114: typedef struct
        !           115:     {
        !           116:     UINT        iMsg;
        !           117:     WPARAM      wParam;
        !           118:     LPARAM      lParam;
        !           119:     } GBMSG, FAR *PGBMSG;
        !           120: 
        !           121: #define CBGBMSG sizeof(GBMSG);
        !           122: 
        !           123: //For GBM_GIZMOGETTEXT
        !           124: typedef struct
        !           125:     {
        !           126:     LPSTR       psz;
        !           127:     UINT        cch;
        !           128:     } GBGETTEXT, FAR * PGBGETTEXT;
        !           129: 
        !           130: #define CBGBGETTEXT sizeof(GBGETTEXT);
        !           131: 
        !           132: 
        !           133: //For GBM_GIZMOGETINT
        !           134: typedef struct
        !           135:     {
        !           136:     BOOL        fSigned;
        !           137:     BOOL        fSuccess;
        !           138:     } GBGETINT, FAR * PGBGETINT;
        !           139: 
        !           140: #define CBGBGETINT sizeof(GBGETINT);
        !           141: 
        !           142: 
        !           143: //For GBM_GIZMOSETINT
        !           144: typedef struct
        !           145:     {
        !           146:     UINT        uValue;
        !           147:     BOOL        fSigned;
        !           148:     } GBSETINT, FAR * PGBSETINT;
        !           149: 
        !           150: #define CBGBSETINT sizeof(GBSETINT);
        !           151: 
        !           152: 
        !           153: 
        !           154: //Gizmo control types.  DO NOT CHANGE THESE!
        !           155: #define GIZMOTYPE_EDIT                  0x0001
        !           156: #define GIZMOTYPE_LISTBOX               0x0002
        !           157: #define GIZMOTYPE_COMBOBOX              0x0004
        !           158: #define GIZMOTYPE_BUTTONNORMAL          0x0008      //Top of windowed gizmos.
        !           159: #define GIZMOTYPE_TEXT                  0x0010
        !           160: #define GIZMOTYPE_SEPARATOR             0x0020
        !           161: #define GIZMOTYPE_BUTTONATTRIBUTEIN     0x0040
        !           162: #define GIZMOTYPE_BUTTONATTRIBUTEEX     0x0080
        !           163: #define GIZMOTYPE_BUTTONCOMMAND         0x0100
        !           164: 
        !           165: 
        !           166: //Generic state flags for non-buttons based on BTTNCUR.H's button groups.
        !           167: #define GIZMO_NORMAL                    (BUTTONGROUP_ACTIVE)
        !           168: #define GIZMO_DISABLED                  (BUTTONGROUP_DISABLED)
        !           169: 
        !           170: 
        !           171: 
        !           172: #ifdef __cplusplus
        !           173:     }   //Match with extern "C" above.
        !           174: #endif
        !           175: 
        !           176: 
        !           177: 
        !           178: #endif //_GIZMOBAR_H_

unix.superglobalmegacorp.com

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