1
{******************************************************************************}
3
{ Visual Styles (Themes) API interface Unit for Object Pascal }
5
{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
6
{ Corporation. All Rights Reserved. }
8
{ The original file is: uxtheme.h, released June 2001. The original Pascal }
9
{ code is: UxTheme.pas, released July 2001. The initial developer of the }
10
{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
12
{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
13
{ Marcel van Brakel. All Rights Reserved. }
15
{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
17
{ You may retrieve the latest version of this file at the Project JEDI }
18
{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
20
{ The contents of this file are used with permission, subject to the Mozilla }
21
{ Public License Version 1.1 (the "License"); you may not use this file except }
22
{ in compliance with the License. You may obtain a copy of the License at }
23
{ http://www.mozilla.org/MPL/MPL-1.1.html }
25
{ Software distributed under the License is distributed on an "AS IS" basis, }
26
{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
27
{ the specific language governing rights and limitations under the License. }
29
{ Alternatively, the contents of this file may be used under the terms of the }
30
{ GNU Lesser General Public License (the "LGPL License"), in which case the }
31
{ provisions of the LGPL License are applicable instead of those above. }
32
{ If you wish to allow use of your version of this file only under the terms }
33
{ of the LGPL License and not to allow others to use your version of this file }
34
{ under the MPL, indicate your decision by deleting the provisions above and }
35
{ replace them with the notice and other provisions required by the LGPL }
36
{ License. If you do not delete the provisions above, a recipient may use }
37
{ your version of this file under either the MPL or the LGPL License. }
39
{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
41
{******************************************************************************}
43
// $Id: JwaUxTheme.pas,v 1.9 2005/09/08 07:49:25 marquardt Exp $
50
{$HPPEMIT '#include "uxtheme.h"'}
61
HIMAGELIST = Pointer; // TODO
64
HTHEME = HANDLE; // handle to a section of theme data for class
67
//---------------------------------------------------------------------------
68
// NOTE: PartId's and StateId's used in the theme API are defined in the
69
// hdr file <tmschema.h> using the TM_PART and TM_STATE macros. For
70
// example, "TM_PART(BP, PUSHBUTTON)" defines the PartId "BP_PUSHBUTTON".
72
//---------------------------------------------------------------------------
73
// OpenThemeData() - Open the theme data for the specified HWND and
74
// semi-colon separated list of class names.
76
// OpenThemeData() will try each class name, one at
77
// a time, and use the first matching theme info
78
// found. If a match is found, a theme handle
79
// to the data is returned. If no match is found,
80
// a "NULL" handle is returned.
82
// When the window is destroyed or a WM_THEMECHANGED
83
// msg is received, "CloseThemeData()" should be
84
// called to close the theme handle.
86
// hwnd - window handle of the control/window to be themed
88
// pszClassList - class name (or list of names) to match to theme data
89
// section. if the list contains more than one name,
90
// the names are tested one at a time for a match.
91
// If a match is found, OpenThemeData() returns a
92
// theme handle associated with the matching class.
93
// This param is a list (instead of just a single
94
// class name) to provide the class an opportunity
95
// to get the "best" match between the class and
96
// the current theme. For example, a button might
97
// pass L"OkButton, Button" if its ID=ID_OK. If
98
// the current theme has an entry for OkButton,
99
// that will be used. Otherwise, we fall back on
100
// the normal Button entry.
101
//---------------------------------------------------------------------------
103
function OpenThemeData(hwnd: HWND; pszClassList: LPCWSTR): HTHEME; stdcall;
104
{$EXTERNALSYM OpenThemeData}
106
//---------------------------------------------------------------------------
107
// CloseTHemeData() - closes the theme data handle. This should be done
108
// when the window being themed is destroyed or
109
// whenever a WM_THEMECHANGED msg is received
110
// (followed by an attempt to create a new Theme data
113
// hTheme - open theme data handle (returned from prior call
114
// to OpenThemeData() API).
115
//---------------------------------------------------------------------------
117
function CloseThemeData(hTheme: HTHEME): HRESULT; stdcall;
118
{$EXTERNALSYM CloseThemeData}
120
//---------------------------------------------------------------------------
121
// functions for basic drawing support
122
//---------------------------------------------------------------------------
123
// The following methods are the theme-aware drawing services.
124
// Controls/Windows are defined in drawable "parts" by their author: a
125
// parent part and 0 or more child parts. Each of the parts can be
126
// described in "states" (ex: disabled, hot, pressed).
127
//---------------------------------------------------------------------------
128
// For the list of all themed classes and the definition of all
129
// parts and states, see the file "tmschmea.h".
130
//---------------------------------------------------------------------------
131
// Each of the below methods takes a "iPartId" param to specify the
132
// part and a "iStateId" to specify the state of the part.
133
// "iStateId=0" refers to the root part. "iPartId" = "0" refers to
135
//-----------------------------------------------------------------------
136
// Note: draw operations are always scaled to fit (and not to exceed)
137
// the specified "Rect".
138
//-----------------------------------------------------------------------
140
//------------------------------------------------------------------------
141
// DrawThemeBackground()
142
// - draws the theme-specified border and fill for
143
// the "iPartId" and "iStateId". This could be
144
// based on a bitmap file, a border and fill, or
145
// other image description.
147
// hTheme - theme data handle
148
// hdc - HDC to draw into
149
// iPartId - part number to draw
150
// iStateId - state number (of the part) to draw
151
// pRect - defines the size/location of the part
152
// pClipRect - optional clipping rect (don't draw outside it)
153
//------------------------------------------------------------------------
155
function DrawThemeBackground(hTheme: HTHEME; hdc: HDC; iPartId, iStateId: Integer;
156
const pRect: RECT; pClipRect: PRECT): HRESULT; stdcall;
157
{$EXTERNALSYM DrawThemeBackground}
159
//---------------------------------------------------------------------------
160
//----- DrawThemeText() flags ----
163
DTT_GRAYED = $1; // draw a grayed-out string
164
{$EXTERNALSYM DTT_GRAYED}
166
//-------------------------------------------------------------------------
167
// DrawThemeText() - draws the text using the theme-specified
168
// color and font for the "iPartId" and
171
// hTheme - theme data handle
172
// hdc - HDC to draw into
173
// iPartId - part number to draw
174
// iStateId - state number (of the part) to draw
175
// pszText - actual text to draw
176
// dwCharCount - number of chars to draw (-1 for all)
177
// dwTextFlags - same as DrawText() "uFormat" param
178
// dwTextFlags2 - additional drawing options
179
// pRect - defines the size/location of the part
180
//-------------------------------------------------------------------------
182
function DrawThemeText(hTheme: HTHEME; hdc: HDC; iPartId, iStateId: Integer;
183
pszText: LPCWSTR; iCharCount: Integer; dwTextFlags, dwTextFlags2: DWORD;
184
const pRect: RECT): HRESULT; stdcall;
185
{$EXTERNALSYM DrawThemeText}
187
//-------------------------------------------------------------------------
188
// GetThemeBackgroundContentRect()
189
// - gets the size of the content for the theme-defined
190
// background. This is usually the area inside
191
// the borders or Margins.
193
// hTheme - theme data handle
194
// hdc - (optional) device content to be used for drawing
195
// iPartId - part number to draw
196
// iStateId - state number (of the part) to draw
197
// pBoundingRect - the outer RECT of the part being drawn
198
// pContentRect - RECT to receive the content area
199
//-------------------------------------------------------------------------
201
function GetThemeBackgroundContentRect(hTheme: HTHEME; hdc: HDC; iPartId, iStateId: Integer;
202
const pBoundingRect: RECT; pContentRect: PRECT): HRESULT; stdcall;
203
{$EXTERNALSYM GetThemeBackgroundContentRect}
205
//-------------------------------------------------------------------------
206
// GetThemeBackgroundExtent() - calculates the size/location of the theme-
207
// specified background based on the
210
// hTheme - theme data handle
211
// hdc - (optional) device content to be used for drawing
212
// iPartId - part number to draw
213
// iStateId - state number (of the part) to draw
214
// pContentRect - RECT that defines the content area
215
// pBoundingRect - RECT to receive the overall size/location of part
216
//-------------------------------------------------------------------------
218
function GetThemeBackgroundExtent(hTheme: HTHEME; hdc: HDC; iPartId, iStateId: Integer;
219
const pContentRect: RECT; var pExtentRect: RECT): HRESULT; stdcall;
220
{$EXTERNALSYM GetThemeBackgroundExtent}
222
//-------------------------------------------------------------------------
226
TS_MIN, // minimum size
227
TS_TRUE, // size without stretching
228
TS_DRAW); // size that theme mgr will use to draw part
229
{$EXTERNALSYM THEMESIZE}
230
TThemeSize = THEMESIZE;
232
//-------------------------------------------------------------------------
233
// GetThemePartSize() - returns the specified size of the theme part
235
// hTheme - theme data handle
236
// hdc - HDC to select font into & measure against
237
// iPartId - part number to retrieve size for
238
// iStateId - state number (of the part)
239
// prc - (optional) rect for part drawing destination
240
// eSize - the type of size to be retreived
241
// psz - receives the specified size of the part
242
//-------------------------------------------------------------------------
244
function GetThemePartSize(hTheme: HTHEME; hdc: HDC; iPartId, iStateId: Integer;
245
prc: PRECT; eSize: THEMESIZE; var psz: TSize): HRESULT; stdcall;
246
{$EXTERNALSYM GetThemePartSize}
248
//-------------------------------------------------------------------------
249
// GetThemeTextExtent() - calculates the size/location of the specified
250
// text when rendered in the Theme Font.
252
// hTheme - theme data handle
253
// hdc - HDC to select font & measure into
254
// iPartId - part number to draw
255
// iStateId - state number (of the part)
256
// pszText - the text to be measured
257
// dwCharCount - number of chars to draw (-1 for all)
258
// dwTextFlags - same as DrawText() "uFormat" param
259
// pszBoundingRect - optional: to control layout of text
260
// pszExtentRect - receives the RECT for text size/location
261
//-------------------------------------------------------------------------
263
function GetThemeTextExtent(hTheme: HTHEME; hdc: HDC; iPartId, iStateId: Integer;
264
pszText: LPCWSTR; iCharCount: Integer; dwTextFlags: DWORD; pBoundingRect: PRECT;
265
var pExtentRect: RECT): HRESULT; stdcall;
266
{$EXTERNALSYM GetThemeTextExtent}
268
//-------------------------------------------------------------------------
269
// GetThemeTextMetrics()
270
// - returns info about the theme-specified font
271
// for the part/state passed in.
273
// hTheme - theme data handle
274
// hdc - optional: HDC for screen context
275
// iPartId - part number to draw
276
// iStateId - state number (of the part)
277
// ptm - receives the font info
278
//-------------------------------------------------------------------------
280
function GetThemeTextMetrics(hTheme: HTHEME; hdc: HDC; iPartId, iStateId: Integer;
281
var ptm: TEXTMETRIC): HRESULT; stdcall;
282
{$EXTERNALSYM GetThemeTextMetrics}
284
//-------------------------------------------------------------------------
285
// GetThemeBackgroundRegion()
286
// - computes the region for a regular or partially
287
// transparent theme-specified background that is
288
// bound by the specified "pRect".
289
// If the rectangle is empty, sets the HRGN to NULL
290
// and return S_FALSE.
292
// hTheme - theme data handle
293
// hdc - optional HDC to draw into (DPI scaling)
294
// iPartId - part number to draw
295
// iStateId - state number (of the part)
296
// pRect - the RECT used to draw the part
297
// pRegion - receives handle to calculated region
298
//-------------------------------------------------------------------------
300
function GetThemeBackgroundRegion(hTheme: HTHEME; hdc: HDC; iPartId, iStateId: Integer;
301
const pRect: RECT; var pRegion: HRGN): HRESULT; stdcall;
302
{$EXTERNALSYM GetThemeBackgroundRegion}
304
//-------------------------------------------------------------------------
305
//----- HitTestThemeBackground, HitTestThemeBackgroundRegion flags ----
307
// Theme background segment hit test flag (default). possible return values are:
308
// HTCLIENT: hit test succeeded in the middle background segment
309
// HTTOP, HTLEFT, HTTOPLEFT, etc: // hit test succeeded in the the respective theme background segment.
312
HTTB_BACKGROUNDSEG = $0000;
313
{$EXTERNALSYM HTTB_BACKGROUNDSEG}
315
// Fixed border hit test option. possible return values are:
316
// HTCLIENT: hit test succeeded in the middle background segment
317
// HTBORDER: hit test succeeded in any other background segment
319
HTTB_FIXEDBORDER = $0002; // Return code may be either HTCLIENT or HTBORDER.
320
{$EXTERNALSYM HTTB_FIXEDBORDER}
322
// Caption hit test option. Possible return values are:
323
// HTCAPTION: hit test succeeded in the top, top left, or top right background segments
324
// HTNOWHERE or another return code, depending on absence or presence of accompanying flags, resp.
326
HTTB_CAPTION = $0004;
327
{$EXTERNALSYM HTTB_CAPTION}
329
// Resizing border hit test flags. Possible return values are:
330
// HTCLIENT: hit test succeeded in middle background segment
331
// HTTOP, HTTOPLEFT, HTLEFT, HTRIGHT, etc: hit test succeeded in the respective system resizing zone
332
// HTBORDER: hit test failed in middle segment and resizing zones, but succeeded in a background border segment
334
HTTB_RESIZINGBORDER_LEFT = $0010; // Hit test left resizing border,
335
{$EXTERNALSYM HTTB_RESIZINGBORDER_LEFT}
336
HTTB_RESIZINGBORDER_TOP = $0020; // Hit test top resizing border
337
{$EXTERNALSYM HTTB_RESIZINGBORDER_TOP}
338
HTTB_RESIZINGBORDER_RIGHT = $0040; // Hit test right resizing border
339
{$EXTERNALSYM HTTB_RESIZINGBORDER_RIGHT}
340
HTTB_RESIZINGBORDER_BOTTOM = $0080; // Hit test bottom resizing border
341
{$EXTERNALSYM HTTB_RESIZINGBORDER_BOTTOM}
343
HTTB_RESIZINGBORDER = (HTTB_RESIZINGBORDER_LEFT or HTTB_RESIZINGBORDER_TOP or
344
HTTB_RESIZINGBORDER_RIGHT or HTTB_RESIZINGBORDER_BOTTOM);
345
{$EXTERNALSYM HTTB_RESIZINGBORDER}
347
// Resizing border is specified as a template, not just window edges.
348
// This option is mutually exclusive with HTTB_SYSTEMSIZINGWIDTH; HTTB_SIZINGTEMPLATE takes precedence
350
HTTB_SIZINGTEMPLATE = $0100;
351
{$EXTERNALSYM HTTB_SIZINGTEMPLATE}
353
// Use system resizing border width rather than theme content margins.
354
// This option is mutually exclusive with HTTB_SIZINGTEMPLATE, which takes precedence.
356
HTTB_SYSTEMSIZINGMARGINS = $0200;
357
{$EXTERNALSYM HTTB_SYSTEMSIZINGMARGINS}
359
//-------------------------------------------------------------------------
360
// HitTestThemeBackground()
361
// - returns a HitTestCode (a subset of the values
362
// returned by WM_NCHITTEST) for the point "ptTest"
363
// within the theme-specified background
364
// (bound by pRect). "pRect" and "ptTest" should
365
// both be in the same coordinate system
366
// (client, screen, etc).
368
// hTheme - theme data handle
369
// hdc - HDC to draw into
370
// iPartId - part number to test against
371
// iStateId - state number (of the part)
372
// pRect - the RECT used to draw the part
373
// hrgn - optional region to use; must be in same coordinates as
374
// - pRect and pTest.
375
// ptTest - the hit point to be tested
376
// dwOptions - HTTB_xxx constants
377
// pwHitTestCode - receives the returned hit test code - one of:
379
// HTNOWHERE, HTLEFT, HTTOPLEFT, HTBOTTOMLEFT,
380
// HTRIGHT, HTTOPRIGHT, HTBOTTOMRIGHT,
381
// HTTOP, HTBOTTOM, HTCLIENT
382
//-------------------------------------------------------------------------
384
function HitTestThemeBackground(hTheme: HTHEME; hdc: HDC; iPartId, iStateId: Integer;
385
dwOptions: DWORD; const pRect: RECT; hrgn: HRGN; ptTest: POINT; var pwHitTestCode: WORD): HRESULT; stdcall;
386
{$EXTERNALSYM HitTestThemeBackground}
388
//------------------------------------------------------------------------
389
// DrawThemeEdge() - Similar to the DrawEdge() API, but uses part colors
390
// and is high-DPI aware
391
// hTheme - theme data handle
392
// hdc - HDC to draw into
393
// iPartId - part number to draw
394
// iStateId - state number of part
395
// pDestRect - the RECT used to draw the line(s)
396
// uEdge - Same as DrawEdge() API
397
// uFlags - Same as DrawEdge() API
398
// pContentRect - Receives the interior rect if (uFlags & BF_ADJUST)
399
//------------------------------------------------------------------------
401
function DrawThemeEdge(hTheme: HTHEME; hdc: HDC; iPartId, iStateId: Integer;
402
const pDestRect: RECT; uEdge, uFlags: UINT; pContentRect: PRECT): HRESULT; stdcall;
403
{$EXTERNALSYM DrawThemeEdge}
405
//------------------------------------------------------------------------
406
// DrawThemeIcon() - draws an image within an imagelist based on
407
// a (possible) theme-defined effect.
409
// hTheme - theme data handle
410
// hdc - HDC to draw into
411
// iPartId - part number to draw
412
// iStateId - state number of part
413
// pRect - the RECT to draw the image within
414
// himl - handle to IMAGELIST
415
// iImageIndex - index into IMAGELIST (which icon to draw)
416
//------------------------------------------------------------------------
418
function DrawThemeIcon(hTheme: HTHEME; hdc: HDC; iPartId, iStateId: Integer;
419
const pRect: RECT; himl: HIMAGELIST; iImageIndex: Integer): HRESULT; stdcall;
420
{$EXTERNALSYM DrawThemeIcon}
422
//---------------------------------------------------------------------------
423
// IsThemePartDefined() - returns TRUE if the theme has defined parameters
424
// for the specified "iPartId" and "iStateId".
426
// hTheme - theme data handle
427
// iPartId - part number to find definition for
428
// iStateId - state number of part
429
//---------------------------------------------------------------------------
431
function IsThemePartDefined(hTheme: HTHEME; iPartId, iStateId: Integer): BOOL; stdcall;
432
{$EXTERNALSYM IsThemePartDefined}
434
//---------------------------------------------------------------------------
435
// IsThemeBackgroundPartiallyTransparent()
436
// - returns TRUE if the theme specified background for
437
// the part/state has transparent pieces or
438
// alpha-blended pieces.
440
// hTheme - theme data handle
441
// iPartId - part number
442
// iStateId - state number of part
443
//---------------------------------------------------------------------------
445
function IsThemeBackgroundPartiallyTransparent(hTheme: HTHEME; iPartId, iStateId: Integer): BOOL; stdcall;
446
{$EXTERNALSYM IsThemeBackgroundPartiallyTransparent}
448
//---------------------------------------------------------------------------
449
// lower-level theme information services
450
//---------------------------------------------------------------------------
451
// The following methods are getter routines for each of the Theme Data types.
452
// Controls/Windows are defined in drawable "parts" by their author: a
453
// parent part and 0 or more child parts. Each of the parts can be
454
// described in "states" (ex: disabled, hot, pressed).
455
//---------------------------------------------------------------------------
456
// Each of the below methods takes a "iPartId" param to specify the
457
// part and a "iStateId" to specify the state of the part.
458
// "iStateId=0" refers to the root part. "iPartId" = "0" refers to
460
//-----------------------------------------------------------------------
461
// Each method also take a "iPropId" param because multiple instances of
462
// the same primitive type can be defined in the theme schema.
463
//-----------------------------------------------------------------------
465
//-----------------------------------------------------------------------
466
// GetThemeColor() - Get the value for the specified COLOR property
468
// hTheme - theme data handle
469
// iPartId - part number
470
// iStateId - state number of part
471
// iPropId - the property number to get the value for
472
// pColor - receives the value of the property
473
//-----------------------------------------------------------------------
475
function GetThemeColor(hTheme: HTHEME; iPartId, iStateId, iPropId: Integer;
476
var pColor: COLORREF): HRESULT; stdcall;
477
{$EXTERNALSYM GetThemeColor}
479
//-----------------------------------------------------------------------
480
// GetThemeMetric() - Get the value for the specified metric/size
483
// hTheme - theme data handle
484
// hdc - (optional) hdc to be drawn into (DPI scaling)
485
// iPartId - part number
486
// iStateId - state number of part
487
// iPropId - the property number to get the value for
488
// piVal - receives the value of the property
489
//-----------------------------------------------------------------------
491
function GetThemeMetric(hTheme: HTHEME; hdc: HDC; iPartId, iStateId, iPropId: Integer;
492
var piVal: Integer): HRESULT; stdcall;
493
{$EXTERNALSYM GetThemeMetric}
495
//-----------------------------------------------------------------------
496
// GetThemeString() - Get the value for the specified string property
498
// hTheme - theme data handle
499
// iPartId - part number
500
// iStateId - state number of part
501
// iPropId - the property number to get the value for
502
// pszBuff - receives the string property value
503
// cchMaxBuffChars - max. number of chars allowed in pszBuff
504
//-----------------------------------------------------------------------
506
function GetThemeString(hTheme: HTHEME; iPartId, iStateId, iPropId: Integer;
507
pszBuff: LPWSTR; cchMaxBuffChars: Integer): HRESULT; stdcall;
508
{$EXTERNALSYM GetThemeString}
510
//-----------------------------------------------------------------------
511
// GetThemeBool() - Get the value for the specified BOOL property
513
// hTheme - theme data handle
514
// iPartId - part number
515
// iStateId - state number of part
516
// iPropId - the property number to get the value for
517
// pfVal - receives the value of the property
518
//-----------------------------------------------------------------------
520
function GetThemeBool(hTheme: HTHEME; iPartId, iStateId, iPropId: Integer;
521
var pfVal: BOOL): HRESULT; stdcall;
522
{$EXTERNALSYM GetThemeBool}
524
//-----------------------------------------------------------------------
525
// GetThemeInt() - Get the value for the specified int property
527
// hTheme - theme data handle
528
// iPartId - part number
529
// iStateId - state number of part
530
// iPropId - the property number to get the value for
531
// piVal - receives the value of the property
532
//-----------------------------------------------------------------------
534
function GetThemeInt(hTheme: HTHEME; iPartId, iStateId, iPropId: Integer;
535
var piVal: Integer): HRESULT; stdcall;
536
{$EXTERNALSYM GetThemeInt}
538
//-----------------------------------------------------------------------
539
// GetThemeEnumValue() - Get the value for the specified ENUM property
541
// hTheme - theme data handle
542
// iPartId - part number
543
// iStateId - state number of part
544
// iPropId - the property number to get the value for
545
// piVal - receives the value of the enum (cast to int*)
546
//-----------------------------------------------------------------------
548
function GetThemeEnumValue(hTheme: HTHEME; iPartId, iStateId, iPropId: Integer;
549
var piVal: Integer): HRESULT; stdcall;
550
{$EXTERNALSYM GetThemeEnumValue}
552
//-----------------------------------------------------------------------
553
// GetThemePosition() - Get the value for the specified position
556
// hTheme - theme data handle
557
// iPartId - part number
558
// iStateId - state number of part
559
// iPropId - the property number to get the value for
560
// pPoint - receives the value of the position property
561
//-----------------------------------------------------------------------
563
function GetThemePosition(hTheme: HTHEME; iPartId, iStateId, iPropId: Integer;
564
var pPoint: POINT): HRESULT; stdcall;
565
{$EXTERNALSYM GetThemePosition}
567
//-----------------------------------------------------------------------
568
// GetThemeFont() - Get the value for the specified font property
570
// hTheme - theme data handle
571
// hdc - (optional) hdc to be drawn to (DPI scaling)
572
// iPartId - part number
573
// iStateId - state number of part
574
// iPropId - the property number to get the value for
575
// pFont - receives the value of the LOGFONT property
576
// (scaled for the current logical screen dpi)
577
//-----------------------------------------------------------------------
579
function GetThemeFont(hTheme: HTHEME; hdc: HDC; iPartId, iStateId, iPropId: Integer;
580
var pFont: LOGFONT): HRESULT; stdcall;
581
{$EXTERNALSYM GetThemeFont}
583
//-----------------------------------------------------------------------
584
// GetThemeRect() - Get the value for the specified RECT property
586
// hTheme - theme data handle
587
// iPartId - part number
588
// iStateId - state number of part
589
// iPropId - the property number to get the value for
590
// pRect - receives the value of the RECT property
591
//-----------------------------------------------------------------------
593
function GetThemeRect(hTheme: HTHEME; iPartId, iStateId, iPropId: Integer;
594
var pRect: RECT): HRESULT; stdcall;
595
{$EXTERNALSYM GetThemeRect}
597
//-----------------------------------------------------------------------
601
cxLeftWidth: Integer; // width of left border that retains its size
602
cxRightWidth: Integer; // width of right border that retains its size
603
cyTopHeight: Integer; // height of top border that retains its size
604
cyBottomHeight: Integer; // height of bottom border that retains its size
606
{$EXTERNALSYM _MARGINS}
608
{$EXTERNALSYM MARGINS}
610
{$EXTERNALSYM PMARGINS}
613
//-----------------------------------------------------------------------
614
// GetThemeMargins() - Get the value for the specified MARGINS property
616
// hTheme - theme data handle
617
// hdc - (optional) hdc to be used for drawing
618
// iPartId - part number
619
// iStateId - state number of part
620
// iPropId - the property number to get the value for
621
// prc - RECT for area to be drawn into
622
// pMargins - receives the value of the MARGINS property
623
//-----------------------------------------------------------------------
625
function GetThemeMargins(hTheme: HTHEME; hdc: HDC; iPartId, iStateId, iPropId: Integer;
626
prc: PRECT; var pMargins: MARGINS): HRESULT; stdcall;
627
{$EXTERNALSYM GetThemeMargins}
629
//-----------------------------------------------------------------------
632
MAX_INTLIST_COUNT = 10;
633
{$EXTERNALSYM MAX_INTLIST_COUNT}
637
iValueCount: Integer; // number of values in iValues
638
iValues: array [0..MAX_INTLIST_COUNT - 1] of Integer;
640
{$EXTERNALSYM _INTLIST}
642
{$EXTERNALSYM INTLIST}
644
{$EXTERNALSYM PINTLIST}
647
//-----------------------------------------------------------------------
648
// GetThemeIntList() - Get the value for the specified INTLIST struct
650
// hTheme - theme data handle
651
// iPartId - part number
652
// iStateId - state number of part
653
// iPropId - the property number to get the value for
654
// pIntList - receives the value of the INTLIST property
655
//-----------------------------------------------------------------------
657
function GetThemeIntList(hTheme: HTHEME; iPartId, iStateId, iPropId: Integer;
658
var pIntList: INTLIST): HRESULT; stdcall;
659
{$EXTERNALSYM GetThemeIntList}
661
//-----------------------------------------------------------------------
665
PO_STATE, // property was found in the state section
666
PO_PART, // property was found in the part section
667
PO_CLASS, // property was found in the class section
668
PO_GLOBAL, // property was found in [globals] section
669
PO_NOTFOUND); // property was not found
670
{$EXTERNALSYM PROPERTYORIGIN}
671
TPropertyOrigin = PROPERTYORIGIN;
673
//-----------------------------------------------------------------------
674
// GetThemePropertyOrigin()
675
// - searches for the specified theme property
676
// and sets "pOrigin" to indicate where it was
677
// found (or not found)
679
// hTheme - theme data handle
680
// iPartId - part number
681
// iStateId - state number of part
682
// iPropId - the property number to search for
683
// pOrigin - receives the value of the property origin
684
//-----------------------------------------------------------------------
686
function GetThemePropertyOrigin(hTheme: HTHEME; iPartId, iStateId, iPropId: Integer;
687
var pOrigin: PROPERTYORIGIN): HRESULT; stdcall;
688
{$EXTERNALSYM GetThemePropertyOrigin}
690
//---------------------------------------------------------------------------
692
// - redirects an existing Window to use a different
693
// section of the current theme information than its
694
// class normally asks for.
696
// hwnd - the handle of the window (cannot be NULL)
698
// pszSubAppName - app (group) name to use in place of the calling
699
// app's name. If NULL, the actual calling app
700
// name will be used.
702
// pszSubIdList - semicolon separated list of class Id names to
703
// use in place of actual list passed by the
704
// window's class. if NULL, the id list from the
705
// calling class is used.
706
//---------------------------------------------------------------------------
707
// The Theme Manager will remember the "pszSubAppName" and the
708
// "pszSubIdList" associations thru the lifetime of the window (even
709
// if themes are subsequently changed). The window is sent a
710
// "WM_THEMECHANGED" msg at the end of this call, so that the new
711
// theme can be found and applied.
712
//---------------------------------------------------------------------------
713
// When "pszSubAppName" or "pszSubIdList" are NULL, the Theme Manager
714
// removes the previously remember association. To turn off theme-ing for
715
// the specified window, you can pass an empty string (L"") so it
716
// won't match any section entries.
717
//---------------------------------------------------------------------------
719
function SetWindowTheme(hwnd: HWND; pszSubAppName: LPCWSTR; pszSubIdList: LPCWSTR): HRESULT; stdcall;
720
{$EXTERNALSYM SetWindowTheme}
722
//---------------------------------------------------------------------------
723
// GetThemeFilename() - Get the value for the specified FILENAME property.
725
// hTheme - theme data handle
726
// iPartId - part number
727
// iStateId - state number of part
728
// iPropId - the property number to search for
729
// pszThemeFileName - output buffer to receive the filename
730
// cchMaxBuffChars - the size of the return buffer, in chars
731
//---------------------------------------------------------------------------
733
function GetThemeFilename(hTheme: HTHEME; iPartId, iStateId, iPropId: Integer;
734
pszThemeFileName: LPWSTR; cchMaxBuffChars: Integer): HRESULT; stdcall;
735
{$EXTERNALSYM GetThemeFilename}
737
//---------------------------------------------------------------------------
738
// GetThemeSysColor() - Get the value of the specified System color.
740
// hTheme - the theme data handle. if non-NULL, will return
741
// color from [SysMetrics] section of theme.
742
// if NULL, will return the global system color.
744
// iColorId - the system color index defined in winuser.h
745
//---------------------------------------------------------------------------
747
function GetThemeSysColor(hTheme: HTHEME; iColorId: Integer): COLORREF; stdcall;
748
{$EXTERNALSYM GetThemeSysColor}
750
//---------------------------------------------------------------------------
751
// GetThemeSysColorBrush()
752
// - Get the brush for the specified System color.
754
// hTheme - the theme data handle. if non-NULL, will return
755
// brush matching color from [SysMetrics] section of
756
// theme. if NULL, will return the brush matching
757
// global system color.
759
// iColorId - the system color index defined in winuser.h
760
//---------------------------------------------------------------------------
762
function GetThemeSysColorBrush(hTheme: HTHEME; iColorId: Integer): HBRUSH; stdcall;
763
{$EXTERNALSYM GetThemeSysColorBrush}
765
//---------------------------------------------------------------------------
766
// GetThemeSysBool() - Get the boolean value of specified System metric.
768
// hTheme - the theme data handle. if non-NULL, will return
769
// BOOL from [SysMetrics] section of theme.
770
// if NULL, will return the specified system boolean.
772
// iBoolId - the TMT_XXX BOOL number (first BOOL
774
//---------------------------------------------------------------------------
776
function GetThemeSysBool(hTheme: HTHEME; iBoolId: Integer): BOOL; stdcall;
777
{$EXTERNALSYM GetThemeSysBool}
779
//---------------------------------------------------------------------------
780
// GetThemeSysSize() - Get the value of the specified System size metric.
781
// (scaled for the current logical screen dpi)
783
// hTheme - the theme data handle. if non-NULL, will return
784
// size from [SysMetrics] section of theme.
785
// if NULL, will return the global system metric.
787
// iSizeId - the following values are supported when
788
// hTheme is non-NULL:
790
// SM_CXBORDER (border width)
791
// SM_CXVSCROLL (scrollbar width)
792
// SM_CYHSCROLL (scrollbar height)
793
// SM_CXSIZE (caption width)
794
// SM_CYSIZE (caption height)
795
// SM_CXSMSIZE (small caption width)
796
// SM_CYSMSIZE (small caption height)
797
// SM_CXMENUSIZE (menubar width)
798
// SM_CYMENUSIZE (menubar height)
800
// when hTheme is NULL, iSizeId is passed directly
801
// to the GetSystemMetrics() function
802
//---------------------------------------------------------------------------
804
function GetThemeSysSize(hTheme: HTHEME; iSizeId: Integer): Integer; stdcall;
805
{$EXTERNALSYM GetThemeSysSize}
807
//---------------------------------------------------------------------------
808
// GetThemeSysFont() - Get the LOGFONT for the specified System font.
810
// hTheme - the theme data handle. if non-NULL, will return
811
// font from [SysMetrics] section of theme.
812
// if NULL, will return the specified system font.
814
// iFontId - the TMT_XXX font number (first font
815
// is TMT_CAPTIONFONT)
817
// plf - ptr to LOGFONT to receive the font value.
818
// (scaled for the current logical screen dpi)
819
//---------------------------------------------------------------------------
821
function GetThemeSysFont(hTheme: HTHEME; iFontId: Integer; var plf: LOGFONT): HRESULT; stdcall;
822
{$EXTERNALSYM GetThemeSysFont}
824
//---------------------------------------------------------------------------
825
// GetThemeSysString() - Get the value of specified System string metric.
827
// hTheme - the theme data handle (required)
829
// iStringId - must be one of the following values:
834
// pszStringBuff - the buffer to receive the string value
836
// cchMaxStringChars - max. number of chars that pszStringBuff can hold
837
//---------------------------------------------------------------------------
839
function GetThemeSysString(hTheme: HTHEME; iStringId: Integer;
840
pszStringBuff: LPWSTR; cchMaxStringChars: Integer): HRESULT; stdcall;
841
{$EXTERNALSYM GetThemeSysString}
843
//---------------------------------------------------------------------------
844
// GetThemeSysInt() - Get the value of specified System int.
846
// hTheme - the theme data handle (required)
848
// iIntId - must be one of the following values:
854
// piValue - ptr to int to receive value
855
//---------------------------------------------------------------------------
857
function GetThemeSysInt(hTheme: HTHEME; iIntId: Integer; var piValue: Integer): HRESULT; stdcall;
858
{$EXTERNALSYM GetThemeSysInt}
860
//---------------------------------------------------------------------------
861
// IsThemeActive() - can be used to test if a system theme is active
862
// for the current user session.
864
// use the API "IsAppThemed()" to test if a theme is
865
// active for the calling process.
866
//---------------------------------------------------------------------------
868
function IsThemeActive: BOOL; stdcall;
869
{$EXTERNALSYM IsThemeActive}
871
//---------------------------------------------------------------------------
872
// IsAppThemed() - returns TRUE if a theme is active and available to
873
// the current process
874
//---------------------------------------------------------------------------
876
function IsAppThemed: BOOL; stdcall;
877
{$EXTERNALSYM IsAppThemed}
879
//---------------------------------------------------------------------------
880
// GetWindowTheme() - if window is themed, returns its most recent
881
// HTHEME from OpenThemeData() - otherwise, returns
884
// hwnd - the window to get the HTHEME of
885
//---------------------------------------------------------------------------
887
function GetWindowTheme(hwnd: HWND): HTHEME; stdcall;
888
{$EXTERNALSYM GetWindowTheme}
890
//---------------------------------------------------------------------------
891
// EnableThemeDialogTexture()
893
// - Enables/disables dialog background theme. This method can be used to
894
// tailor dialog compatibility with child windows and controls that
895
// may or may not coordinate the rendering of their client area backgrounds
896
// with that of their parent dialog in a manner that supports seamless
897
// background texturing.
899
// hdlg - the window handle of the target dialog
900
// dwFlags - ETDT_ENABLE to enable the theme-defined dialog background texturing,
901
// ETDT_DISABLE to disable background texturing,
902
// ETDT_ENABLETAB to enable the theme-defined background
903
// texturing using the Tab texture
904
//---------------------------------------------------------------------------
907
ETDT_DISABLE = $00000001;
908
{$EXTERNALSYM ETDT_DISABLE}
909
ETDT_ENABLE = $00000002;
910
{$EXTERNALSYM ETDT_ENABLE}
911
ETDT_USETABTEXTURE = $00000004;
912
{$EXTERNALSYM ETDT_USETABTEXTURE}
913
ETDT_ENABLETAB = ETDT_ENABLE or ETDT_USETABTEXTURE;
914
{$EXTERNALSYM ETDT_ENABLETAB}
916
function EnableThemeDialogTexture(hwnd: HWND; dwFlags: DWORD): HRESULT; stdcall;
917
{$EXTERNALSYM EnableThemeDialogTexture}
919
//---------------------------------------------------------------------------
920
// IsThemeDialogTextureEnabled()
922
// - Reports whether the dialog supports background texturing.
924
// hdlg - the window handle of the target dialog
925
//---------------------------------------------------------------------------
927
function IsThemeDialogTextureEnabled(hwnd: HWND): BOOL; stdcall;
928
{$EXTERNALSYM IsThemeDialogTextureEnabled}
930
//---------------------------------------------------------------------------
931
//---- flags to control theming within an app ----
934
STAP_ALLOW_NONCLIENT = 1 shl 0;
935
{$EXTERNALSYM STAP_ALLOW_NONCLIENT}
936
STAP_ALLOW_CONTROLS = 1 shl 1;
937
{$EXTERNALSYM STAP_ALLOW_CONTROLS}
938
STAP_ALLOW_WEBCONTENT = 1 shl 2;
939
{$EXTERNALSYM STAP_ALLOW_WEBCONTENT}
941
//---------------------------------------------------------------------------
942
// GetThemeAppProperties()
943
// - returns the app property flags that control theming
944
//---------------------------------------------------------------------------
946
function GetThemeAppProperties: DWORD; stdcall;
947
{$EXTERNALSYM GetThemeAppProperties}
949
//---------------------------------------------------------------------------
950
// SetThemeAppProperties()
951
// - sets the flags that control theming within the app
953
// dwFlags - the flag values to be set
954
//---------------------------------------------------------------------------
956
procedure SetThemeAppProperties(dwFlags: DWORD); stdcall;
957
{$EXTERNALSYM SetThemeAppProperties}
959
//---------------------------------------------------------------------------
960
// GetCurrentThemeName()
961
// - Get the name of the current theme in-use.
962
// Optionally, return the ColorScheme name and the
963
// Size name of the theme.
965
// pszThemeFileName - receives the theme path & filename
966
// cchMaxNameChars - max chars allowed in pszNameBuff
968
// pszColorBuff - (optional) receives the canonical color scheme name
969
// (not the display name)
970
// cchMaxColorChars - max chars allowed in pszColorBuff
972
// pszSizeBuff - (optional) receives the canonical size name
973
// (not the display name)
974
// cchMaxSizeChars - max chars allowed in pszSizeBuff
975
//---------------------------------------------------------------------------
977
function GetCurrentThemeName(pszThemeFileName: LPWSTR; cchMaxNameChars: Integer; pszColorBuff: LPWSTR;
978
cchMaxColorChars: Integer; pszSizeBuff: LPWSTR; cchMaxSizeChars: Integer): HRESULT; stdcall;
979
{$EXTERNALSYM GetCurrentThemeName}
981
//---------------------------------------------------------------------------
982
// GetThemeDocumentationProperty()
983
// - Get the value for the specified property name from
984
// the [documentation] section of the themes.ini file
985
// for the specified theme. If the property has been
986
// localized in the theme files string table, the
987
// localized version of the property value is returned.
989
// pszThemeFileName - filename of the theme file to query
990
// pszPropertyName - name of the string property to retreive a value for
991
// pszValueBuff - receives the property string value
992
// cchMaxValChars - max chars allowed in pszValueBuff
993
//---------------------------------------------------------------------------
996
SZ_THDOCPROP_DISPLAYNAME = WideString('DisplayName');
997
{$EXTERNALSYM SZ_THDOCPROP_DISPLAYNAME}
998
SZ_THDOCPROP_CANONICALNAME = WideString('ThemeName');
999
{$EXTERNALSYM SZ_THDOCPROP_CANONICALNAME}
1000
SZ_THDOCPROP_TOOLTIP = WideString('ToolTip');
1001
{$EXTERNALSYM SZ_THDOCPROP_TOOLTIP}
1002
SZ_THDOCPROP_AUTHOR = WideString('author');
1003
{$EXTERNALSYM SZ_THDOCPROP_AUTHOR}
1005
function GetThemeDocumentationProperty(pszThemeName, pszPropertyName: LPCWSTR;
1006
pszValueBuff: LPWSTR; cchMaxValChars: Integer): HRESULT; stdcall;
1007
{$EXTERNALSYM GetThemeDocumentationProperty}
1009
//---------------------------------------------------------------------------
1010
// Theme API Error Handling
1012
// All functions in the Theme API not returning an HRESULT (THEMEAPI_)
1013
// use the WIN32 function "SetLastError()" to record any call failures.
1015
// To retreive the error code of the last failure on the
1016
// current thread for these type of API's, use the WIN32 function
1017
// "GetLastError()".
1019
// All Theme API error codes (HRESULT's and GetLastError() values)
1020
// should be normal win32 errors which can be formatted into
1021
// strings using the Win32 API FormatMessage().
1022
//---------------------------------------------------------------------------
1024
//---------------------------------------------------------------------------
1025
// DrawThemeParentBackground()
1026
// - used by partially-transparent or alpha-blended
1027
// child controls to draw the part of their parent
1028
// that they appear in front of.
1030
// hwnd - handle of the child control
1032
// hdc - hdc of the child control
1034
// prc - (optional) rect that defines the area to be
1035
// drawn (CHILD coordinates)
1036
//---------------------------------------------------------------------------
1038
function DrawThemeParentBackground(hwnd: HWND; hdc: HDC; prc: PRECT): HRESULT; stdcall;
1039
{$EXTERNALSYM DrawThemeParentBackground}
1041
//---------------------------------------------------------------------------
1042
// EnableTheming() - enables or disables themeing for the current user
1043
// in the current and future sessions.
1045
// fEnable - if FALSE, disable theming & turn themes off.
1046
// - if TRUE, enable themeing and, if user previously
1047
// had a theme active, make it active now.
1048
//---------------------------------------------------------------------------
1050
function EnableTheming(fEnable: BOOL): HRESULT; stdcall;
1051
{$EXTERNALSYM EnableTheming}
1053
//------------------------------------------------------------------------
1054
//---- bits used in dwFlags of DTBGOPTS ----
1057
DTBG_CLIPRECT = $00000001; // rcClip has been specified
1058
{$EXTERNALSYM DTBG_CLIPRECT}
1059
DTBG_DRAWSOLID = $00000002; // draw transparent/alpha images as solid
1060
{$EXTERNALSYM DTBG_DRAWSOLID}
1061
DTBG_OMITBORDER = $00000004; // don't draw border of part
1062
{$EXTERNALSYM DTBG_OMITBORDER}
1063
DTBG_OMITCONTENT = $00000008; // don't draw content area of part
1064
{$EXTERNALSYM DTBG_OMITCONTENT}
1066
DTBG_COMPUTINGREGION = $00000010; // TRUE if calling to compute region
1067
{$EXTERNALSYM DTBG_COMPUTINGREGION}
1069
DTBG_MIRRORDC = $00000020; // assume the hdc is mirrorred and
1070
// flip images as appropriate (currently
1071
// only supported for bgtype=imagefile)
1072
{$EXTERNALSYM DTBG_MIRRORDC}
1074
//------------------------------------------------------------------------
1078
dwSize: DWORD; // size of the struct
1079
dwFlags: DWORD; // which options have been specified
1080
rcClip: RECT; // clipping rectangle
1082
{$EXTERNALSYM _DTBGOPTS}
1083
DTBGOPTS = _DTBGOPTS;
1084
{$EXTERNALSYM DTBGOPTS}
1085
PDTBGOPTS = ^DTBGOPTS;
1086
TDtbgOpts = DTBGOPTS;
1088
//------------------------------------------------------------------------
1089
// DrawThemeBackgroundEx()
1090
// - draws the theme-specified border and fill for
1091
// the "iPartId" and "iStateId". This could be
1092
// based on a bitmap file, a border and fill, or
1093
// other image description. NOTE: This will be
1094
// merged back into DrawThemeBackground() after
1097
// hTheme - theme data handle
1098
// hdc - HDC to draw into
1099
// iPartId - part number to draw
1100
// iStateId - state number (of the part) to draw
1101
// pRect - defines the size/location of the part
1102
// pOptions - ptr to optional params
1103
//------------------------------------------------------------------------
1105
function DrawThemeBackgroundEx(hTheme: HTHEME; hdc: HDC; iPartId, iStateId: Integer; pRect: LPRECT; pOptions: PDTBGOPTS): HRESULT; stdcall;
1106
{$EXTERNALSYM DrawThemeBackgroundEx}
1113
{$IFDEF DYNAMIC_LINK}
1116
_OpenThemeData: Pointer;
1118
function OpenThemeData;
1120
GetProcedureAddress(_OpenThemeData, themelib, 'OpenThemeData');
1124
JMP [_OpenThemeData]
1129
_CloseThemeData: Pointer;
1131
function CloseThemeData;
1133
GetProcedureAddress(_CloseThemeData, themelib, 'CloseThemeData');
1137
JMP [_CloseThemeData]
1142
_DrawThemeBackground: Pointer;
1144
function DrawThemeBackground;
1146
GetProcedureAddress(_DrawThemeBackground, themelib, 'DrawThemeBackground');
1150
JMP [_DrawThemeBackground]
1155
_DrawThemeText: Pointer;
1157
function DrawThemeText;
1159
GetProcedureAddress(_DrawThemeText, themelib, 'DrawThemeText');
1163
JMP [_DrawThemeText]
1168
_GetThemeBackgroundContentRect: Pointer;
1170
function GetThemeBackgroundContentRect;
1172
GetProcedureAddress(_GetThemeBackgroundContentRect, themelib, 'GetThemeBackgroundContentRect');
1176
JMP [_GetThemeBackgroundContentRect]
1181
_GetThemeBackgroundExtent: Pointer;
1183
function GetThemeBackgroundExtent;
1185
GetProcedureAddress(_GetThemeBackgroundExtent, themelib, 'GetThemeBackgroundContentRect');
1189
JMP [_GetThemeBackgroundExtent]
1194
_GetThemePartSize: Pointer;
1196
function GetThemePartSize;
1198
GetProcedureAddress(_GetThemePartSize, themelib, 'GetThemePartSize');
1202
JMP [_GetThemePartSize]
1207
_GetThemeTextExtent: Pointer;
1209
function GetThemeTextExtent;
1211
GetProcedureAddress(_GetThemeTextExtent, themelib, 'GetThemeTextExtent');
1215
JMP [_GetThemeTextExtent]
1220
_GetThemeTextMetrics: Pointer;
1222
function GetThemeTextMetrics;
1224
GetProcedureAddress(_GetThemeTextMetrics, themelib, 'GetThemeTextMetrics');
1228
JMP [_GetThemeTextMetrics]
1233
_GetThemeBackgroundRegion: Pointer;
1235
function GetThemeBackgroundRegion;
1237
GetProcedureAddress(_GetThemeBackgroundRegion, themelib, 'GetThemeBackgroundRegion');
1241
JMP [_GetThemeBackgroundRegion]
1246
_HitTestThemeBackground: Pointer;
1248
function HitTestThemeBackground;
1250
GetProcedureAddress(_HitTestThemeBackground, themelib, 'HitTestThemeBackground');
1254
JMP [_HitTestThemeBackground]
1259
_DrawThemeEdge: Pointer;
1261
function DrawThemeEdge;
1263
GetProcedureAddress(_DrawThemeEdge, themelib, 'DrawThemeEdge');
1267
JMP [_DrawThemeEdge]
1272
_DrawThemeIcon: Pointer;
1274
function DrawThemeIcon;
1276
GetProcedureAddress(_DrawThemeIcon, themelib, 'DrawThemeIcon');
1280
JMP [_DrawThemeIcon]
1285
_IsThemePartDefined: Pointer;
1287
function IsThemePartDefined;
1289
GetProcedureAddress(_IsThemePartDefined, themelib, 'IsThemePartDefined');
1293
JMP [_IsThemePartDefined]
1298
_IsThemeBackgroundPartialTrans: Pointer;
1300
function IsThemeBackgroundPartiallyTransparent;
1302
GetProcedureAddress(_IsThemeBackgroundPartialTrans, themelib, 'IsThemeBackgroundPartiallyTransparent');
1306
JMP [_IsThemeBackgroundPartialTrans]
1311
_GetThemeColor: Pointer;
1313
function GetThemeColor;
1315
GetProcedureAddress(_GetThemeColor, themelib, 'GetThemeColor');
1319
JMP [_GetThemeColor]
1324
_GetThemeMetric: Pointer;
1326
function GetThemeMetric;
1328
GetProcedureAddress(_GetThemeMetric, themelib, 'GetThemeMetric');
1332
JMP [_GetThemeMetric]
1337
_GetThemeString: Pointer;
1339
function GetThemeString;
1341
GetProcedureAddress(_GetThemeString, themelib, 'GetThemeString');
1345
JMP [_GetThemeString]
1350
_GetThemeBool: Pointer;
1352
function GetThemeBool;
1354
GetProcedureAddress(_GetThemeBool, themelib, 'GetThemeBool');
1363
_GetThemeInt: Pointer;
1365
function GetThemeInt;
1367
GetProcedureAddress(_GetThemeInt, themelib, 'GetThemeInt');
1376
_GetThemeEnumValue: Pointer;
1378
function GetThemeEnumValue;
1380
GetProcedureAddress(_GetThemeEnumValue, themelib, 'GetThemeEnumValue');
1384
JMP [_GetThemeEnumValue]
1389
_GetThemePosition: Pointer;
1391
function GetThemePosition;
1393
GetProcedureAddress(_GetThemePosition, themelib, 'GetThemePosition');
1397
JMP [_GetThemePosition]
1402
_GetThemeFont: Pointer;
1404
function GetThemeFont;
1406
GetProcedureAddress(_GetThemeFont, themelib, 'GetThemeFont');
1415
_GetThemeRect: Pointer;
1417
function GetThemeRect;
1419
GetProcedureAddress(_GetThemeRect, themelib, 'GetThemeRect');
1428
_GetThemeMargins: Pointer;
1430
function GetThemeMargins;
1432
GetProcedureAddress(_GetThemeMargins, themelib, 'GetThemeMargins');
1436
JMP [_GetThemeMargins]
1441
_GetThemeIntList: Pointer;
1443
function GetThemeIntList;
1445
GetProcedureAddress(_GetThemeIntList, themelib, 'GetThemeIntList');
1449
JMP [_GetThemeIntList]
1454
_GetThemePropertyOrigin: Pointer;
1456
function GetThemePropertyOrigin;
1458
GetProcedureAddress(_GetThemePropertyOrigin, themelib, 'GetThemePropertyOrigin');
1462
JMP [_GetThemePropertyOrigin]
1467
_SetWindowTheme: Pointer;
1469
function SetWindowTheme;
1471
GetProcedureAddress(_SetWindowTheme, themelib, 'SetWindowTheme');
1475
JMP [_SetWindowTheme]
1480
_GetThemeFilename: Pointer;
1482
function GetThemeFilename;
1484
GetProcedureAddress(_GetThemeFilename, themelib, 'GetThemeFilename');
1488
JMP [_GetThemeFilename]
1493
_GetThemeSysColor: Pointer;
1495
function GetThemeSysColor;
1497
GetProcedureAddress(_GetThemeSysColor, themelib, 'GetThemeSysColor');
1501
JMP [_GetThemeSysColor]
1506
_GetThemeSysColorBrush: Pointer;
1508
function GetThemeSysColorBrush;
1510
GetProcedureAddress(_GetThemeSysColorBrush, themelib, 'GetThemeSysColorBrush');
1514
JMP [_GetThemeSysColorBrush]
1519
_GetThemeSysBool: Pointer;
1521
function GetThemeSysBool;
1523
GetProcedureAddress(_GetThemeSysBool, themelib, 'GetThemeSysBool');
1527
JMP [_GetThemeSysBool]
1532
_GetThemeSysSize: Pointer;
1534
function GetThemeSysSize;
1536
GetProcedureAddress(_GetThemeSysSize, themelib, 'GetThemeSysSize');
1540
JMP [_GetThemeSysSize]
1545
_GetThemeSysFont: Pointer;
1547
function GetThemeSysFont;
1549
GetProcedureAddress(_GetThemeSysFont, themelib, 'GetThemeSysFont');
1553
JMP [_GetThemeSysFont]
1558
_GetThemeSysString: Pointer;
1560
function GetThemeSysString;
1562
GetProcedureAddress(_GetThemeSysString, themelib, 'GetThemeSysString');
1566
JMP [_GetThemeSysString]
1571
_GetThemeSysInt: Pointer;
1573
function GetThemeSysInt;
1575
GetProcedureAddress(_GetThemeSysInt, themelib, 'GetThemeSysInt');
1579
JMP [_GetThemeSysInt]
1584
_IsThemeActive: Pointer;
1586
function IsThemeActive;
1588
GetProcedureAddress(_IsThemeActive, themelib, 'IsThemeActive');
1592
JMP [_IsThemeActive]
1597
_IsAppThemed: Pointer;
1599
function IsAppThemed;
1601
GetProcedureAddress(_IsAppThemed, themelib, 'IsAppThemed');
1610
_GetWindowTheme: Pointer;
1612
function GetWindowTheme;
1614
GetProcedureAddress(_GetWindowTheme, themelib, 'GetWindowTheme');
1618
JMP [_GetWindowTheme]
1623
_EnableThemeDialogTexture: Pointer;
1625
function EnableThemeDialogTexture;
1627
GetProcedureAddress(_EnableThemeDialogTexture, themelib, 'EnableThemeDialogTexture');
1631
JMP [_EnableThemeDialogTexture]
1636
_IsThemeDialogTextureEnabled: Pointer;
1638
function IsThemeDialogTextureEnabled;
1640
GetProcedureAddress(_IsThemeDialogTextureEnabled, themelib, 'IsThemeDialogTextureEnabled');
1644
JMP [_IsThemeDialogTextureEnabled]
1649
_GetThemeAppProperties: Pointer;
1651
function GetThemeAppProperties;
1653
GetProcedureAddress(_GetThemeAppProperties, themelib, 'GetThemeAppProperties');
1657
JMP [_GetThemeAppProperties]
1662
_SetThemeAppProperties: Pointer;
1664
procedure SetThemeAppProperties;
1666
GetProcedureAddress(_SetThemeAppProperties, themelib, 'SetThemeAppProperties');
1670
JMP [_SetThemeAppProperties]
1675
_GetCurrentThemeName: Pointer;
1677
function GetCurrentThemeName;
1679
GetProcedureAddress(_GetCurrentThemeName, themelib, 'GetCurrentThemeName');
1683
JMP [_GetCurrentThemeName]
1688
_GetThemeDocumentationProperty: Pointer;
1690
function GetThemeDocumentationProperty;
1692
GetProcedureAddress(_GetThemeDocumentationProperty, themelib, 'GetThemeDocumentationProperty');
1696
JMP [_GetThemeDocumentationProperty]
1701
_DrawThemeParentBackground: Pointer;
1703
function DrawThemeParentBackground;
1705
GetProcedureAddress(_DrawThemeParentBackground, themelib, 'DrawThemeParentBackground');
1709
JMP [_DrawThemeParentBackground]
1714
_EnableTheming: Pointer;
1716
function EnableTheming;
1718
GetProcedureAddress(_EnableTheming, themelib, 'EnableTheming');
1722
JMP [_EnableTheming]
1727
_DrawThemeBackgroundEx: Pointer;
1729
function DrawThemeBackgroundEx;
1731
GetProcedureAddress(_DrawThemeBackgroundEx, themelib, 'DrawThemeBackgroundEx');
1735
JMP [_DrawThemeBackgroundEx]
1741
function OpenThemeData; external themelib name 'OpenThemeData';
1742
function CloseThemeData; external themelib name 'CloseThemeData';
1743
function DrawThemeBackground; external themelib name 'DrawThemeBackground';
1744
function DrawThemeText; external themelib name 'DrawThemeText';
1745
function GetThemeBackgroundContentRect; external themelib name 'GetThemeBackgroundContentRect';
1746
function GetThemeBackgroundExtent; external themelib name 'GetThemeBackgroundContentRect';
1747
function GetThemePartSize; external themelib name 'GetThemePartSize';
1748
function GetThemeTextExtent; external themelib name 'GetThemeTextExtent';
1749
function GetThemeTextMetrics; external themelib name 'GetThemeTextMetrics';
1750
function GetThemeBackgroundRegion; external themelib name 'GetThemeBackgroundRegion';
1751
function HitTestThemeBackground; external themelib name 'HitTestThemeBackground';
1752
function DrawThemeEdge; external themelib name 'DrawThemeEdge';
1753
function DrawThemeIcon; external themelib name 'DrawThemeIcon';
1754
function IsThemePartDefined; external themelib name 'IsThemePartDefined';
1755
function IsThemeBackgroundPartiallyTransparent; external themelib name 'IsThemeBackgroundPartiallyTransparent';
1756
function GetThemeColor; external themelib name 'GetThemeColor';
1757
function GetThemeMetric; external themelib name 'GetThemeMetric';
1758
function GetThemeString; external themelib name 'GetThemeString';
1759
function GetThemeBool; external themelib name 'GetThemeBool';
1760
function GetThemeInt; external themelib name 'GetThemeInt';
1761
function GetThemeEnumValue; external themelib name 'GetThemeEnumValue';
1762
function GetThemePosition; external themelib name 'GetThemePosition';
1763
function GetThemeFont; external themelib name 'GetThemeFont';
1764
function GetThemeRect; external themelib name 'GetThemeRect';
1765
function GetThemeMargins; external themelib name 'GetThemeMargins';
1766
function GetThemeIntList; external themelib name 'GetThemeIntList';
1767
function GetThemePropertyOrigin; external themelib name 'GetThemePropertyOrigin';
1768
function SetWindowTheme; external themelib name 'SetWindowTheme';
1769
function GetThemeFilename; external themelib name 'GetThemeFilename';
1770
function GetThemeSysColor; external themelib name 'GetThemeSysColor';
1771
function GetThemeSysColorBrush; external themelib name 'GetThemeSysColorBrush';
1772
function GetThemeSysBool; external themelib name 'GetThemeSysBool';
1773
function GetThemeSysSize; external themelib name 'GetThemeSysSize';
1774
function GetThemeSysFont; external themelib name 'GetThemeSysFont';
1775
function GetThemeSysString; external themelib name 'GetThemeSysString';
1776
function GetThemeSysInt; external themelib name 'GetThemeSysInt';
1777
function IsThemeActive; external themelib name 'IsThemeActive';
1778
function IsAppThemed; external themelib name 'IsAppThemed';
1779
function GetWindowTheme; external themelib name 'GetWindowTheme';
1780
function EnableThemeDialogTexture; external themelib name 'EnableThemeDialogTexture';
1781
function IsThemeDialogTextureEnabled; external themelib name 'IsThemeDialogTextureEnabled';
1782
function GetThemeAppProperties; external themelib name 'GetThemeAppProperties';
1783
procedure SetThemeAppProperties; external themelib name 'SetThemeAppProperties';
1784
function GetCurrentThemeName; external themelib name 'GetCurrentThemeName';
1785
function GetThemeDocumentationProperty; external themelib name 'GetThemeDocumentationProperty';
1786
function DrawThemeParentBackground; external themelib name 'DrawThemeParentBackground';
1787
function EnableTheming; external themelib name 'EnableTheming';
1788
function DrawThemeBackgroundEx; external themelib name 'DrawThemeBackgroundEx';
1790
{$ENDIF DYNAMIC_LINK}