uLib
User mode C/C++ extended API library for Win32 programmers.
|
Additional toolbar APIs...
Macros | |
#define | _TBS(s) (INT_PTR)_T(s) |
#define | TBTN_HEIGHT 22 |
#define | TBTN_WIDTH 22 |
#define | TBAR_HEIGHT 26 |
Functions | |
HWND | CreateToolbar (HWND hParent, UINT Id, UINT x, UINT y, UINT w, UINT h, UINT cxBtn, UINT cyBtn, HIMAGELIST hImages, LPTBBUTTON Buttons, UINT nButtons, DWORD Style, DWORD ExStyle) |
HWND | CreateStdToolbar (HWND hParent, UINT Id, UINT x, UINT y, UINT w, UINT h, UINT imgType, LPTBBUTTON Buttons, UINT nButtons, DWORD Style, DWORD ExStyle) |
#define _TBS | ( | s | ) | (INT_PTR)_T(s) |
Toolbutton string for the TBBUTTONs used with CreateToolbar().
Definition at line 1638 of file UtilFunc.h.
#define TBTN_HEIGHT 22 |
Toolbutton height (undocumented CommCtrl32 mandate?)
Definition at line 1668 of file UtilFunc.h.
#define TBTN_WIDTH 22 |
Toolbutton width (undocumented CommCtrl32 mandate?)
Definition at line 1669 of file UtilFunc.h.
#define TBAR_HEIGHT 26 |
Toolbar height (TBSTYLE_LIST w/o divider)
Definition at line 1670 of file UtilFunc.h.
HWND CreateToolbar | ( | HWND | hParent, |
UINT | Id, | ||
UINT | x, | ||
UINT | y, | ||
UINT | w, | ||
UINT | h, | ||
UINT | cxBtn, | ||
UINT | cyBtn, | ||
HIMAGELIST | hImages, | ||
LPTBBUTTON | Buttons, | ||
UINT | nButtons, | ||
DWORD | Style, | ||
DWORD | ExStyle | ||
) |
Create a toolbar that uses a specific image list.
Since the original CreateToolbar API ceased to exist,
I brazenly usurp the id to supercede CreateToolbarEx 😉
If it causes you grievance, let me know...
Note: Using CCS_NORESIZE style is crucial for toolbars in rebar bands.
Without it, the toolbar will resize itself to overpaint the whole rebar.
It also makes toolbars less than 26 pixels high possible.
See also CreateStdToolbar(), ImageList_CreateMapped().
hParent | Parent of the toolbar. |
Id | Id of the toolbar. |
w | Toolbar position and width. |
h | Toolbar height (nearly always ignored by CommCtrl32). |
cyBtn | Toolbutton size (nearly always ignored by CommCtrl32). |
hImages | Handle of the imagelist to use. |
Buttons | Array of TBBUTTON structs defining the buttons. |
nButtons | Nr of buttons in the array. |
Style | Toolbar window style (the ususal mess).. |
ExStyle | Accepts both TBSTYLE_EX_nn and WS_EX_nn. |
Definition at line 1604 of file UserUtil.cpp.
HWND CreateStdToolbar | ( | HWND | hParent, |
UINT | Id, | ||
UINT | x, | ||
UINT | y, | ||
UINT | w, | ||
UINT | h, | ||
UINT | imgType, | ||
LPTBBUTTON | Buttons, | ||
UINT | nButtons, | ||
DWORD | Style, | ||
DWORD | ExStyle | ||
) |
Create a toolbar that uses a standard image list built into CommCtrl.
imgType | Can be one of IDB_STD_SMALL_COLOR, IDB_VIEW_SMALL_COLOR, or IDB_HIST_SMALL_COLOR. |
Note: The LARGE_nn image list variants seems to be dysfunctional..?
See also CreateToolbar() and [MSDN] Toolbar Standard Button Image Index Values.
Definition at line 1640 of file UserUtil.cpp.