Owner-Drawn Status Windows

You can define individual parts of a status window to be owner-drawn parts. Using this technique gives you more control than you would otherwise have over the appearance of the window part. For example, you can display a bitmap rather than text in a part or draw text using a different font.

To define a window part as owner-drawn, send the SB_SETTEXT message to the status window, specifying the part and the SBT_OWNERDRAW drawing technique. When SBT_OWNERDRAW is specified, the lParam parameter is a 32-bit application-defined value that the application can use when drawing the part. For example, you can specify a font handle, a bitmap handle, a pointer to a string, and so on.

When a status window needs to draw an owner-drawn part, it sends the WM_DRAWITEM message to the parent window. The wParam parameter of the message is the child window identifier of the status window, and the lParam parameter is a pointer to a DRAWITEMSTRUCT structure. The parent window uses the information in the structure to draw the part. For an owner-drawn part of a status window, DRAWITEMSTRUCT contains the following information.

Member
Description
CtlType
Undefined; do not use.
CtlID
Child-window identifier of the status window.
itemID
Zero-based index of the part to be drawn.
itemAction
Undefined; do not use.
itemState
Undefined; do not use.
hwndItem
Handle to the status window.
hDC
Handle to the device context of the status window.
rcItem
Coordinates of the window part to be drawn. The coordinates are relative to the upper left corner of the status window.
itemData
Application-defined 32-bit value specified in the lParam parameter of the SB_SETTEXT message.

Software for developers
Delphi Components
.Net Components
Software for Android Developers
More information resources
MegaDetailed.Net
Unix Manual Pages
Delphi Examples
Databases for Amazon shops developers
Amazon Categories Database
Browse Nodes Database