00001
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029 #ifndef _MGUI_CTRL_NEWTOOLBAR_H
00030 #define _MGUI_CTRL_NEWTOOLBAR_H
00031
00032 #ifdef __cplusplus
00033 extern "C" {
00034 #endif
00035
00062 #define CTRL_NEWTOOLBAR ("newtoolbar")
00063
00065 typedef struct _NTBINFO
00066 {
00068 PBITMAP image;
00069
00071 int nr_cells;
00072
00085 int nr_cols;
00086
00091 int w_cell;
00092
00097 int h_cell;
00098
00099 } NTBINFO;
00100
00111 typedef void (* HOTSPOTPROC)(HWND hwnd, int id, const RECT* cell, int x, int y);
00112
00113
00114 #define NTB_TEXT_LEN 15
00115
00116 #define NTB_TIP_LEN 255
00117
00118 #define NTBIF_PUSHBUTTON 0x0001
00119 #define NTBIF_HOTSPOTBUTTON 0x0002
00120 #define NTBIF_SEPARATOR 0x0003
00121 #define NTBIF_CHECKBUTTON 0x0005
00122 #define NTBIF_NEWLINE 0x0008
00123 #define NTBIF_TYPEMASK 0x000F
00124
00129 #define NTBIF_DISABLED 0x0010
00130
00134 #define NTBIF_CHECKED 0x0020
00135
00136 #define MTB_WHICH_FLAGS 0x0001
00137 #define MTB_WHICH_ID 0x0002
00138 #define MTB_WHICH_TEXT 0x0004
00139 #define MTB_WHICH_TIP 0x0008
00140 #define MTB_WHICH_CELL 0x0010
00141 #define MTB_WHICH_HOTSPOT 0x0020
00142 #define MTB_WHICH_ADDDATA 0x0040
00143
00145 typedef struct _NTBITEMINFO
00146 {
00159 DWORD which;
00160
00171 DWORD flags;
00172
00178 int id;
00179
00184 char* text;
00185
00187 char* tip;
00188
00190 int bmp_cell;
00191
00193 HOTSPOTPROC hotspot_proc;
00194
00196 RECT rc_hotspot;
00197
00199 DWORD add_data;
00200 } NTBITEMINFO;
00201
00206 typedef NTBITEMINFO* PNTBITEMINFO;
00207
00217 #define NTBS_WITHTEXT 0x000000001L
00218
00223 #define NTBS_TEXTRIGHT 0x000000002L
00224
00230 #define NTBS_DRAWSTATES 0x000000004L
00231
00236 #define NTBS_DRAWSEPARATOR 0x000000008L
00237
00242 #define NTBS_HORIZONTAL 0x00000000L
00243
00248 #define NTBS_VERTICAL 0x00000010L
00249
00256 #define NTBS_MULTLINE 0x00000020L
00257
00265 #define NTB_OKAY 0
00266
00267 #define NTB_ERR (-1)
00268
00269 #define NTB_ERR_SPACE (-2)
00270
00271 #define NTB_ERR_DUPID (-3)
00272
00291 #define NTBM_ADDITEM 0xFE00
00292
00311 #define NTBM_GETITEM 0xFE01
00312
00331 #define NTBM_SETITEM 0xFE02
00332
00351 #define NTBM_ENABLEITEM 0xFE03
00352
00369 #define NTBM_SETBITMAP 0xFE04
00370
00371
00372 #define NTBM_MSGMAX 0xFE10
00373
00380 #ifdef __cplusplus
00381 }
00382 #endif
00383
00384 #endif
00385