Annotation of mstools/ole20/h/bttncur.h, revision 1.1

1.1     ! root        1: /*
        !             2:  * BTTNCUR.H
        !             3:  * Buttons & Cursors Version 1.1, March 1993
        !             4:  *
        !             5:  * Public include file for the Button Images and Cursor DLL, including
        !             6:  * structures, definitions, and function prototypes.
        !             7:  *
        !             8:  * Copyright (c)1992-1993 Microsoft Corporation, All Rights Reserved,
        !             9:  * as applied to redistribution of this source code in source form
        !            10:  * License is granted to use of compiled code in shipped binaries.
        !            11:  */
        !            12: 
        !            13: 
        !            14: #ifndef _BTTNCUR_H_
        !            15: #define _BTTNCUR_H_
        !            16: 
        !            17: #ifdef __cplusplus
        !            18: extern "C"
        !            19:     {
        !            20: #endif
        !            21: 
        !            22: 
        !            23: //Standard image bitmap
        !            24: 
        !            25: //WARNING:  Obsolete.  Use the return from UIToolDisplayData
        !            26: #define IDB_STANDARDIMAGES              400
        !            27: 
        !            28: //New values for display types
        !            29: #define IDB_STANDARDIMAGESMIN           400
        !            30: #define IDB_STANDARDIMAGES96            400
        !            31: #define IDB_STANDARDIMAGES72            401
        !            32: #define IDB_STANDARDIMAGES120           402
        !            33: 
        !            34: 
        !            35: 
        !            36: //Image indices inside the standard bitmap.
        !            37: #define TOOLIMAGE_MIN                   0
        !            38: #define TOOLIMAGE_EDITCUT               0
        !            39: #define TOOLIMAGE_EDITCOPY              1
        !            40: #define TOOLIMAGE_EDITPASTE             2
        !            41: #define TOOLIMAGE_FILENEW               3
        !            42: #define TOOLIMAGE_FILEOPEN              4
        !            43: #define TOOLIMAGE_FILESAVE              5
        !            44: #define TOOLIMAGE_FILEPRINT             6
        !            45: #define TOOLIMAGE_HELP                  7
        !            46: #define TOOLIMAGE_HELPCONTEXT           8
        !            47: #define TOOLIMAGE_MAX                   8
        !            48: 
        !            49: 
        !            50: //Additional Standard Cursors as defined in the UI Design Guide.
        !            51: #define IDC_NEWUICURSORMIN              500
        !            52: #define IDC_RIGHTARROW                  500
        !            53: #define IDC_CONTEXTHELP                 501
        !            54: #define IDC_MAGNIFY                     502
        !            55: #define IDC_NODROP                      503
        !            56: #define IDC_TABLETOP                    504
        !            57: #define IDC_HSIZEBAR                    505
        !            58: #define IDC_VSIZEBAR                    506
        !            59: #define IDC_HSPLITBAR                   507
        !            60: #define IDC_VSPLITBAR                   508
        !            61: #define IDC_SMALLARROWS                 509
        !            62: #define IDC_LARGEARROWS                 510
        !            63: #define IDC_HARROWS                     511
        !            64: #define IDC_VARROWS                     512
        !            65: #define IDC_NESWARROWS                  513
        !            66: #define IDC_NWSEARROWS                  514
        !            67: #define IDC_NEWUICURSORMAX              514
        !            68: 
        !            69: 
        !            70: 
        !            71: //Standard sizes for toolbar buttons and bitmaps on display types
        !            72: 
        !            73: //WARNING:  These are obsolete for version 1.0 compatibility/
        !            74: #define TOOLBUTTON_STDWIDTH             24
        !            75: #define TOOLBUTTON_STDHEIGHT            22
        !            76: #define TOOLBUTTON_STDIMAGEWIDTH        16
        !            77: #define TOOLBUTTON_STDIMAGEHEIGHT       15
        !            78: 
        !            79: /*
        !            80:  * Applications can call UIToolDisplayData to get the particular
        !            81:  * values to use for the current display instead of using these values
        !            82:  * directly.  However, if the application has the aspect ratio already
        !            83:  * then these are available for them.
        !            84:  */
        !            85: 
        !            86: //Sizes for 72 DPI (EGA)
        !            87: #define TOOLBUTTON_STD72WIDTH           24
        !            88: #define TOOLBUTTON_STD72HEIGHT          16
        !            89: #define TOOLBUTTON_STD72IMAGEWIDTH      16
        !            90: #define TOOLBUTTON_STD72IMAGEHEIGHT     11
        !            91: 
        !            92: //Sizes for 96 DPI (VGA)
        !            93: #define TOOLBUTTON_STD96WIDTH           24
        !            94: #define TOOLBUTTON_STD96HEIGHT          22
        !            95: #define TOOLBUTTON_STD96IMAGEWIDTH      16
        !            96: #define TOOLBUTTON_STD96IMAGEHEIGHT     15
        !            97: 
        !            98: //Sizes for 120 DPI (8514/a)
        !            99: #define TOOLBUTTON_STD120WIDTH          32
        !           100: #define TOOLBUTTON_STD120HEIGHT         31
        !           101: #define TOOLBUTTON_STD120IMAGEWIDTH     24
        !           102: #define TOOLBUTTON_STD120IMAGEHEIGHT    23
        !           103: 
        !           104: 
        !           105: //Sizes of a standard button bar depending on the display
        !           106: #define CYBUTTONBAR72                   23
        !           107: #define CYBUTTONBAR96                   29
        !           108: #define CYBUTTONBAR120                  38
        !           109: 
        !           110: 
        !           111: 
        !           112: /*
        !           113:  * The low-word of the state contains the display state where each
        !           114:  * value is mutually exclusive and contains one or more grouping bits.
        !           115:  * Each group represents buttons that share some sub-state in common.
        !           116:  *
        !           117:  * The high-order byte controls which colors in the source bitmap,
        !           118:  * black, white, gray, and dark gray, are to be converted into the
        !           119:  * system colors COLOR_BTNTEXT, COLOR_HILIGHT, COLOR_BTNFACE, and
        !           120:  * COLOR_BTNSHADOW.  Any or all of these bits may be set to allow
        !           121:  * the application control over specific colors.
        !           122:  *
        !           123:  * The actual state values are split into a command group and an
        !           124:  * attribute group.  Up, mouse down, and disabled states are identical,
        !           125:  * but only attributes can have down, down disabled, and indeterminate
        !           126:  * states.
        !           127:  *
        !           128:  * BUTTONGROUP_BLANK is defined so an application can draw only the button
        !           129:  * without an image in the up, down, mouse down, or indeterminate
        !           130:  * state, that is, BUTTONGROUP_BLANK is inclusive with BUTTONGROUP_DOWN
        !           131:  * and BUTTONGROUP_LIGHTFACE.
        !           132:  */
        !           133: 
        !           134: 
        !           135: #define BUTTONGROUP_DOWN                0x0001
        !           136: #define BUTTONGROUP_ACTIVE              0x0002
        !           137: #define BUTTONGROUP_DISABLED            0x0004
        !           138: #define BUTTONGROUP_LIGHTFACE           0x0008
        !           139: #define BUTTONGROUP_BLANK               0x0010
        !           140: 
        !           141: //Command buttons only
        !           142: #define COMMANDBUTTON_UP                (BUTTONGROUP_ACTIVE)
        !           143: #define COMMANDBUTTON_MOUSEDOWN         (BUTTONGROUP_ACTIVE | BUTTONGROUP_DOWN)
        !           144: #define COMMANDBUTTON_DISABLED          (BUTTONGROUP_DISABLED)
        !           145: 
        !           146: //Attribute buttons only
        !           147: #define ATTRIBUTEBUTTON_UP              (BUTTONGROUP_ACTIVE)
        !           148: #define ATTRIBUTEBUTTON_MOUSEDOWN       (BUTTONGROUP_ACTIVE | BUTTONGROUP_DOWN)
        !           149: #define ATTRIBUTEBUTTON_DISABLED        (BUTTONGROUP_DISABLED)
        !           150: #define ATTRIBUTEBUTTON_DOWN            (BUTTONGROUP_ACTIVE | BUTTONGROUP_DOWN | BUTTONGROUP_LIGHTFACE)
        !           151: #define ATTRIBUTEBUTTON_INDETERMINATE   (BUTTONGROUP_ACTIVE | BUTTONGROUP_LIGHTFACE)
        !           152: #define ATTRIBUTEBUTTON_DOWNDISABLED    (BUTTONGROUP_DISABLED | BUTTONGROUP_DOWN | BUTTONGROUP_LIGHTFACE)
        !           153: 
        !           154: //Blank buttons only
        !           155: #define BLANKBUTTON_UP                  (BUTTONGROUP_ACTIVE | BUTTONGROUP_BLANK)
        !           156: #define BLANKBUTTON_DOWN                (BUTTONGROUP_ACTIVE | BUTTONGROUP_BLANK | BUTTONGROUP_DOWN | BUTTONGROUP_LIGHTFACE)
        !           157: #define BLANKBUTTON_MOUSEDOWN           (BUTTONGROUP_ACTIVE | BUTTONGROUP_BLANK | BUTTONGROUP_DOWN)
        !           158: #define BLANKBUTTON_INDETERMINATE       (BUTTONGROUP_ACTIVE | BUTTONGROUP_BLANK | BUTTONGROUP_LIGHTFACE)
        !           159: 
        !           160: 
        !           161: /*
        !           162:  * Specific bits to prevent conversions of specific colors to system
        !           163:  * colors.  If an application uses this newer library and never specified
        !           164:  * any bits, then they benefit from color conversion automatically.
        !           165:  */
        !           166: #define PRESERVE_BLACK                  0x0100
        !           167: #define PRESERVE_DKGRAY                 0x0200
        !           168: #define PRESERVE_LTGRAY                 0x0400
        !           169: #define PRESERVE_WHITE                  0x0800
        !           170: 
        !           171: #define PRESERVE_ALL                    (PRESERVE_BLACK | PRESERVE_DKGRAY | PRESERVE_LTGRAY | PRESERVE_WHITE)
        !           172: #define PRESERVE_NONE                   0   //Backwards compatible
        !           173: 
        !           174: 
        !           175: 
        !           176: //Structure for UIToolConfigureForDisplay
        !           177: typedef struct tagTOOLDISPLAYDATA
        !           178:     {
        !           179:     UINT        uDPI;       //Display driver DPI
        !           180:     UINT        cyBar;      //Vertical size for a bar containing buttons.
        !           181:     UINT        cxButton;   //Dimensions of a button.
        !           182:     UINT        cyButton;
        !           183:     UINT        cxImage;    //Dimensions of bitmap image
        !           184:     UINT        cyImage;
        !           185:     UINT        uIDImages;  //Standard resource ID for display-sensitive images
        !           186:     } TOOLDISPLAYDATA, FAR *LPTOOLDISPLAYDATA;
        !           187: 
        !           188: 
        !           189: 
        !           190: //Public functions in BTTNCUR.DLL
        !           191: HCURSOR WINAPI UICursorLoad(UINT);
        !           192: BOOL    WINAPI UIToolConfigureForDisplay(LPTOOLDISPLAYDATA);
        !           193: BOOL    WINAPI UIToolButtonDraw(HDC, int, int, int, int, HBITMAP, int, int, int, UINT);
        !           194: BOOL    WINAPI UIToolButtonDrawTDD(HDC, int, int, int, int, HBITMAP, int, int, int, UINT, LPTOOLDISPLAYDATA);
        !           195: 
        !           196: 
        !           197: #ifdef __cplusplus
        !           198:     }
        !           199: #endif
        !           200: 
        !           201: #endif //_BTTNCUR_H_

unix.superglobalmegacorp.com

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