DrawThemedControl function
|
![]() ![]() |
acXPThemes
|
procedure DrawThemedControl(Wnd: hWnd; DC: hDC; ClassList: lpCWStr; iPartId, iStateId: Integer; const Rect: TRect);
|
The DrawThemedControl function helps to quickly and easily draws the control without opening/closing the theme and painting the parent's background. It is helper for standard WinXP theme API.
|
|
Parameters
|
Wnd | Window handle of the control/window to be themed
|
DC | Handle to a device context (HDC) used for drawing the theme-defined background image;
|
ClassList | Class name (or list of names separated by semi-colon) to match to theme data section;
|
iPartId | Value of type int that specifies the part to draw;
|
iStateId | Value of type int that specifies the state of the part to draw;
|
Rect | A TRect structure that contains the rectangle, in logical coordinates, in which the background image is drawn.
|
procedure DrawThemedControl(Wnd: hWnd; DC: hDC; ClassList: lpCWStr; iPartId, iStateId: Integer; const Rect: TRect);
|
var
|
Theme: hTheme;
|
begin
|
Theme := OpenThemeData(Wnd, ClassList);
|
if Theme <> 0 then
|
begin
|
DrawThemeParentBackground(Wnd, DC, @Rect);
|
DrawThemeBackground(Theme, DC, iPartId, iStateId, Rect, nil);
|
CloseThemeData(Theme);
|
end;
|
end;
|
IsXPThemeEnabled, OpenThemeData, CloseThemeData, DrawThemeBackground and DrawThemeParentBackground functions.
|