uLib
User mode C/C++ extended API library for Win32 programmers.
|
Additional status bar APIs...
Macros | |
#define | SB_SetParts(hctl, npart, ppart) (BOOL) SendMessage( hctl,SB_SETPARTS,(WPARAM)(npart),(LPARAM)(ppart) ) |
#define | SB_SetText(hctl, part, text) (BOOL) SendMessage( hctl,SB_SETTEXT,(WPARAM)(part),(LPARAM)(text) ) |
#define | SB_SetIcon(hctl, part, hico) (BOOL) SendMessage( hctl,SB_SETICON,(WPARAM)(part),(LPARAM)(hico) ) |
Functions | |
HWND | CreateStatusbar (HWND hParent, UINT Id, CSTR Text, UINT Style) |
bool __cdecl | SetStatusParts (HWND hStat, UINT nParts,...) |
bool __cdecl | SetStatusWidths (HWND hStat, UINT nParts, int *Width) |
bool __cdecl | SetStatusText (HWND hStat, UINT Part, CSTR Fmt,...) |
#define SB_SetParts | ( | hctl, | |
npart, | |||
ppart | |||
) | (BOOL) SendMessage( hctl,SB_SETPARTS,(WPARAM)(npart),(LPARAM)(ppart) ) |
Definition at line 1535 of file UtilFunc.h.
#define SB_SetText | ( | hctl, | |
part, | |||
text | |||
) | (BOOL) SendMessage( hctl,SB_SETTEXT,(WPARAM)(part),(LPARAM)(text) ) |
Definition at line 1536 of file UtilFunc.h.
#define SB_SetIcon | ( | hctl, | |
part, | |||
hico | |||
) | (BOOL) SendMessage( hctl,SB_SETICON,(WPARAM)(part),(LPARAM)(hico) ) |
Definition at line 1537 of file UtilFunc.h.
HWND CreateStatusbar | ( | HWND | hParent, |
UINT | Id, | ||
CSTR | Text, | ||
UINT | Style | ||
) |
CreateStatusbar resizes the parent window to make room for a status bar,
and then creates a status bar window at the bottom of the parent.
Note: Essential styles have defaults.. Use Style to provide additional ones.
CCS_TOP, CCS_LEFT, and CCS_RIGHT are actively prohibited..
If you need them, call CreateWindowEx directly.
Definition at line 1434 of file UserUtil.cpp.
bool __cdecl SetStatusParts | ( | HWND | hStat, |
UINT | nParts, | ||
... | |||
) |
SetStatusParts configures the panes of a status bar.
If nParts is < 2, the bar is set to simple mode and the var-args are ignored.
If nParts is >= 2, you must pass at least that many width (not position) specifications.
Pass -1 as the last one to make that pane occupy the remainder of the status bar.
Definition at line 1377 of file UserUtil.cpp.
bool __cdecl SetStatusWidths | ( | HWND | hStat, |
UINT | nParts, | ||
int * | Width | ||
) |
SetStatusWidths configures status panes by an array of widths
(unlike SB_SETPARTS which takes an array of positions).
If nParts is < 2, the bar is set to simple mode and Width is ignored.
See also SetStatusParts().
Definition at line 1398 of file UserUtil.cpp.
bool __cdecl SetStatusText | ( | HWND | hStat, |
UINT | Part, | ||
CSTR | Fmt, | ||
... | |||
) |
SetStatusText formats a string into a 256 char buffer and puts it in the pane.
hStat | Status bar window handle. |
Part | A combination of pane index and SBT_nn flags. |
Fmt | Status text, including optional printf inserts. |
... | [optional] Insert parameters... |
Note: Uses a thread-local static buffer, so it's safe to use with owner-draw
status bars. However, if you use it to custom draw more than one pane,
you'll get cross-feed, since all of them will refer to the same buffer.
Definition at line 1422 of file UserUtil.cpp.