|
|
|
SFTTREE_OWNERDRAW |
The SFTTREE_OWNERDRAW structure is used as parameter for an application-supplied owner-draw function of type LPFNSFTTREE_OWNERDRAWPROC, which is called whenever an object needs to be rendered.
typedef struct tagSftTreeOwnerDraw { #define SFTTREE_OD_CALC 0 // calculate width & height (returned in DrawRect) #define SFTTREE_OD_PAINT 1 // paint in hDC int style; // callback function int itemType; // item to draw #define SFTTREE_OD_CELL 0 #define SFTTREE_OD_CELLTOOLTIP 1 #define SFTTREE_OD_ROWHEADER 2 #define SFTTREE_OD_COLHEADER 3 #define SFTTREE_OD_COLHEADEREND 4 #define SFTTREE_OD_ROWCOLHEADER 5 #define SFTTREE_OD_ROWCOLFOOTER 6 #define SFTTREE_OD_COLFOOTER 7 #define SFTTREE_OD_COLFOOTEREND 8 HDC hDC; // device context RECT DrawRect; // drawing rectangle int gap; // suggested gap size long index; // entry being painted short col; // column number BOOL fSelected; // non-zero if item selected - paint only BOOL fFlyby; // non-zero if flyby - paint only BOOL fFocus; // non-zero if item has focus rectangle - paint only UINT id; // control's ID HWND hwndCtl; // control's window handle BOOL fEnabled; // non-zero if window is enabled #if !defined(_WIN32_WCE) BOOL fThemed; // control is themed HINSTANCE hThemeDLL; // UXTHEME dll handle HANDLE hThemeHeader; // header theme HANDLE hThemeListview; // listview theme HANDLE hThemeTreeview; // treeview theme HANDLE hThemeButton; // button theme HANDLE hThemeCheckBox; // checkbox theme HANDLE hThemeSpin; // spin button theme HANDLE hThemeScrollbar; // scrollbar theme HANDLE hThemeFooter; // footer theme #endif } SFTTREE_OWNERDRAW, * LPSFTTREE_OWNERDRAW;
typedef const SFTTREE_OWNERDRAW * LPCSFTTREE_OWNERDRAW;
Members
Identifies the object to render.
SFTTREE_OD_CALC |
The owner-draw callback is called to calculate the dimensions of the object. |
SFTTREE_OD_PAINT |
The owner-draw callback is called to paint the object. |
Identifies the object.
SFTTREE_OD_CELL |
A cell - index and col describe the cell |
SFTTREE_OD_CELLTOOLTIP |
A ToolTip - index and col describe the cell |
SFTTREE_OD_ROWHEADER |
A row header - index describes the item |
SFTTREE_OD_COLHEADER |
A column header - col describes the column |
SFTTREE_OD_COLHEADEREND |
The column header after the end of the last column (fixed-width only) |
SFTTREE_OD_ROWCOLHEADER |
|
SFTTREE_OD_ROWCOLFOOTER |
|
SFTTREE_OD_COLFOOTER |
The column footer - col describes the column |
SFTTREE_OD_COLFOOTEREND |
The column footer after the end of the last column (fixed-width only) |
The device context.
Modifiable. If style is SFTTREE_OD_CALC, the callback returns the required dimensions in the DrawRect rectangle (the width and height are used). If style is SFTTREE_OD_PAINT, DrawRect describes the available output area where the object must be rendered.
A suggested horizontal gap size, usually used between text and pictures or between the edge of the object and text or pictures.
Defines the item.
Defines the column.
TRUE if the object is selected or pressed.
TRUE if the object should be rendered with flyby highlighting.
TRUE if the tree control has the input focus.
The window ID of the tree control.
The window handle of the tree control.
TRUE if the tree control is enabled.
TRUE if Windows themes are used to render the tree control.
The module handle of the already loaded Dll UxTheme.dll. This Dll contains all Windows theme rendering support offered by Windows and can be used to dynamically load entry points using GetProcAddress, if desired. If Windows themes are not used, this value is NULL.
An HTHEME handle of theme data for the Header class. If Windows themes are not used, this value is NULL.
An HTHEME handle of theme data for the ListView class. If Windows themes are not used, this value is NULL.
An HTHEME handle of theme data for the TreeView class. If Windows themes are not used, this value is NULL.
An HTHEME handle of theme data for the Button class. If Windows themes are not used, this value is NULL.
An HTHEME handle of theme data for the CheckBox class. If Windows themes are not used, this value is NULL.
An HTHEME handle of theme data for the Spin class. If Windows themes are not used, this value is NULL.
An HTHEME handle of theme data for the Scrollbar class. If Windows themes are not used, this value is NULL.
An HTHEME handle of theme data for the Header class. If Windows themes are not used, this value is NULL. Windows does not define a Footer class so the Header class is used by default.
Comments
The SFTTREE_OWNERDRAW structure is used as parameter for an application-supplied owner-draw function of type LPFNSFTTREE_OWNERDRAWPROC, which is called whenever an object needs to be rendered.
The callback receives control when an object needs to be rendered. The callback can then perform application specific rendering of the object. An application can render cells, cell ToolTips, row headers, column headers and the row/column header using the owner-draw function.
The SetOwnerDrawCallback function defines an application-supplied owner-draw function, which is called whenever an object needs to be rendered.
See Also C/C++ API | Categories | Notifications