00001
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027 #ifndef _MGUI_CTRL_NEWTOOLBAR_H
00028 #define _MGUI_CTRL_NEWTOOLBAR_H
00029
00030 #ifdef __cplusplus
00031 extern "C" {
00032 #endif
00033
00060 #define CTRL_NEWTOOLBAR ("newtoolbar")
00061
00063 typedef struct _NTBINFO
00064 {
00066 PBITMAP image;
00067
00069 int nr_cells;
00070
00083 int nr_cols;
00084
00089 int w_cell;
00090
00095 int h_cell;
00096
00097 } NTBINFO;
00098
00109 typedef void (* HOTSPOTPROC)(HWND hwnd, int id, const RECT* cell, int x, int y);
00110
00111
00112 #define NTB_TEXT_LEN 15
00113
00114 #define NTB_TIP_LEN 255
00115
00116 #define NTBIF_PUSHBUTTON 0x0001
00117 #define NTBIF_HOTSPOTBUTTON 0x0002
00118 #define NTBIF_SEPARATOR 0x0003
00119 #define NTBIF_CHECKBUTTON 0x0005
00120 #define NTBIF_NEWLINE 0x0008
00121 #define NTBIF_TYPEMASK 0x000F
00122
00127 #define NTBIF_DISABLED 0x0010
00128
00132 #define NTBIF_CHECKED 0x0020
00133
00134 #define MTB_WHICH_FLAGS 0x0001
00135 #define MTB_WHICH_ID 0x0002
00136 #define MTB_WHICH_TEXT 0x0004
00137 #define MTB_WHICH_TIP 0x0008
00138 #define MTB_WHICH_CELL 0x0010
00139 #define MTB_WHICH_HOTSPOT 0x0020
00140 #define MTB_WHICH_ADDDATA 0x0040
00141
00143 typedef struct _NTBITEMINFO
00144 {
00157 DWORD which;
00158
00169 DWORD flags;
00170
00176 int id;
00177
00182 char* text;
00183
00185 char* tip;
00186
00188 int bmp_cell;
00189
00191 HOTSPOTPROC hotspot_proc;
00192
00194 RECT rc_hotspot;
00195
00197 DWORD add_data;
00198 } NTBITEMINFO;
00199
00204 typedef NTBITEMINFO* PNTBITEMINFO;
00205
00215 #define NTBS_WITHTEXT 0x000000001L
00216
00221 #define NTBS_TEXTRIGHT 0x000000002L
00222
00228 #define NTBS_DRAWSTATES 0x000000004L
00229
00234 #define NTBS_DRAWSEPARATOR 0x000000008L
00235
00240 #define NTBS_HORIZONTAL 0x00000000L
00241
00246 #define NTBS_VERTICAL 0x00000010L
00247
00254 #define NTBS_MULTLINE 0x00000020L
00255
00263 #define NTB_OKAY 0
00264
00265 #define NTB_ERR (-1)
00266
00267 #define NTB_ERR_SPACE (-2)
00268
00269 #define NTB_ERR_DUPID (-3)
00270
00289 #define NTBM_ADDITEM 0xFE00
00290
00309 #define NTBM_GETITEM 0xFE01
00310
00329 #define NTBM_SETITEM 0xFE02
00330
00349 #define NTBM_ENABLEITEM 0xFE03
00350
00367 #define NTBM_SETBITMAP 0xFE04
00368
00369
00370 #define NTBM_MSGMAX 0xFE10
00371
00378 #ifdef __cplusplus
00379 }
00380 #endif
00381
00382 #endif
00383