|
Owner-Drawn Tabs
If a tab control has the TCS_OWNERDRAWFIXED style, the parent window must
paint tabs by processing the WM_DRAWITEM message. The tab control sends this message whenever a tab needs to be
painted. The lParam parameter specifies the address of a DRAWITEMSTRUCT structure, which contains the index of the tab, its bounding rectangle, and
the device context (DC) in which to draw.
By default, the itemData member of DRAWITEMSTRUCT contains the value of the lParam member of the TC_ITEM structure. However, if you change the amount of application-defined data per
tab, itemData contains a pointer to the data instead. You can change the amount of
application-defined data per tab by using the TCM_SETITEMEXTRA message.
To specify the size of items in a tab control, the parent window must process
the WM_MEASUREITEM message. Because all tabs in an owner-drawn tab control are the same size,
this message is sent only once. There is no tab control style for owner-drawn
tabs of varying size. You can also set the width and height of tabs by using the TCM_SETITEMSIZE message.
Related Links
Software for Delphi and C++ Builder developers
Software for Visual Studio .NET developers
Software for Visual Basic 6 developers
Delphi Tips&Tricks
MegaDetailed.NET
More Online Helps
Win32 Multimedia Programmer's Reference (mmedia.hlp)
OLE Programmer's Reference (ole.hlp)
Microsoft Windows Pen API Programmer's Reference (penapi.hlp)
Microsoft Windows Sockets 2 Reference (sock2.hlp)
Microsoft Windows Telephony API (TAPI) Programmer's Reference (tapi.hlp)
Unix Manual Pages
|