ReactOS  0.4.13-dev-551-gf37fb1f
property.c File Reference
#include "uxthemep.h"
Include dependency graph for property.c:

Go to the source code of this file.

Functions

HRESULT WINAPI GetThemeBool (HTHEME hTheme, int iPartId, int iStateId, int iPropId, BOOL *pfVal)
 
HRESULT WINAPI GetThemeColor (HTHEME hTheme, int iPartId, int iStateId, int iPropId, COLORREF *pColor)
 
HRESULT WINAPI GetThemeEnumValue (HTHEME hTheme, int iPartId, int iStateId, int iPropId, int *piVal)
 
HRESULT WINAPI GetThemeFilename (HTHEME hTheme, int iPartId, int iStateId, int iPropId, LPWSTR pszThemeFilename, int cchMaxBuffChars)
 
HRESULT WINAPI GetThemeFont (HTHEME hTheme, HDC hdc, int iPartId, int iStateId, int iPropId, LOGFONTW *pFont)
 
HRESULT WINAPI GetThemeInt (HTHEME hTheme, int iPartId, int iStateId, int iPropId, int *piVal)
 
HRESULT WINAPI GetThemeIntList (HTHEME hTheme, int iPartId, int iStateId, int iPropId, INTLIST *pIntList)
 
HRESULT WINAPI GetThemePosition (HTHEME hTheme, int iPartId, int iStateId, int iPropId, POINT *pPoint)
 
HRESULT WINAPI GetThemeRect (HTHEME hTheme, int iPartId, int iStateId, int iPropId, RECT *pRect)
 
HRESULT WINAPI GetThemeString (HTHEME hTheme, int iPartId, int iStateId, int iPropId, LPWSTR pszBuff, int cchMaxBuffChars)
 
HRESULT WINAPI GetThemeMargins (HTHEME hTheme, HDC hdc, int iPartId, int iStateId, int iPropId, RECT *prc, MARGINS *pMargins)
 
HRESULT WINAPI GetThemeMetric (HTHEME hTheme, HDC hdc, int iPartId, int iStateId, int iPropId, int *piVal)
 
HRESULT WINAPI GetThemePropertyOrigin (HTHEME hTheme, int iPartId, int iStateId, int iPropId, PROPERTYORIGIN *pOrigin)
 

Function Documentation

◆ GetThemeBool()

HRESULT WINAPI GetThemeBool ( HTHEME  hTheme,
int  iPartId,
int  iStateId,
int  iPropId,
BOOL pfVal 
)

Definition at line 26 of file property.c.

28 {
30  PTHEME_CLASS pClass = ValidateHandle(hTheme);
31 
32  TRACE("(%d, %d, %d)\n", iPartId, iStateId, iPropId);
33 
34  if(!pClass)
35  return E_HANDLE;
36 
37  if(!(tp = MSSTYLES_FindProperty(pClass, iPartId, iStateId, TMT_BOOL, iPropId)))
38  return E_PROP_ID_UNSUPPORTED;
39  return MSSTYLES_GetPropertyBool(tp, pfVal);
40 }
PTHEME_PROPERTY MSSTYLES_FindProperty(PTHEME_CLASS tc, int iPartId, int iStateId, int iPropertyPrimitive, int iPropertyId)
Definition: msstyles.c:835
#define E_HANDLE
Definition: winerror.h:2850
#define TMT_BOOL
Definition: vssym32.h:137
_In_ UINT64 _In_ UINT64 _In_ UINT64 _In_opt_ traverse_ptr * tp
Definition: btrfs.c:2694
HRESULT MSSTYLES_GetPropertyBool(PTHEME_PROPERTY tp, BOOL *pfVal)
Definition: msstyles.c:983
#define TRACE(s)
Definition: solgame.cpp:4
#define E_PROP_ID_UNSUPPORTED
Definition: vfwmsgs.h:173
PTHEME_CLASS ValidateHandle(HTHEME hTheme)
Definition: system.c:717

Referenced by get_image_part_size(), and get_transparency().

◆ GetThemeColor()

HRESULT WINAPI GetThemeColor ( HTHEME  hTheme,
int  iPartId,
int  iStateId,
int  iPropId,
COLORREF pColor 
)

Definition at line 45 of file property.c.

47 {
49  PTHEME_CLASS pClass = ValidateHandle(hTheme);
50 
51  TRACE("(%d, %d, %d)\n", iPartId, iStateId, iPropId);
52  if(!pClass)
53  return E_HANDLE;
54 
55  if(!(tp = MSSTYLES_FindProperty(pClass, iPartId, iStateId, TMT_COLOR, iPropId)))
56  return E_PROP_ID_UNSUPPORTED;
57  return MSSTYLES_GetPropertyColor(tp, pColor);
58 }
PTHEME_PROPERTY MSSTYLES_FindProperty(PTHEME_CLASS tc, int iPartId, int iStateId, int iPropertyPrimitive, int iPropertyId)
Definition: msstyles.c:835
#define E_HANDLE
Definition: winerror.h:2850
_In_ UINT64 _In_ UINT64 _In_ UINT64 _In_opt_ traverse_ptr * tp
Definition: btrfs.c:2694
#define TRACE(s)
Definition: solgame.cpp:4
#define E_PROP_ID_UNSUPPORTED
Definition: vfwmsgs.h:173
PTHEME_CLASS ValidateHandle(HTHEME hTheme)
Definition: system.c:717
HRESULT MSSTYLES_GetPropertyColor(PTHEME_PROPERTY tp, COLORREF *pColor)
Definition: msstyles.c:996
#define TMT_COLOR
Definition: vssym32.h:138

Referenced by DrawThemeText(), get_edge_color(), get_transparency(), IPADDRESS_Draw(), CTrayClockWnd::OnThemeChanged(), TOOLBAR_DrawButton(), TRACKBAR_DrawTics(), UXTHEME_DrawBackgroundFill(), and UXTHEME_DrawBorderRectangle().

◆ GetThemeEnumValue()

HRESULT WINAPI GetThemeEnumValue ( HTHEME  hTheme,
int  iPartId,
int  iStateId,
int  iPropId,
int piVal 
)

Definition at line 63 of file property.c.

65 {
66  HRESULT hr;
67  WCHAR val[60];
69  PTHEME_CLASS pClass = ValidateHandle(hTheme);
70 
71  TRACE("(%d, %d, %d)\n", iPartId, iStateId, iPropId);
72  if(!pClass)
73  return E_HANDLE;
74 
75  if(!(tp = MSSTYLES_FindProperty(pClass, iPartId, iStateId, TMT_ENUM, iPropId)))
76  return E_PROP_ID_UNSUPPORTED;
77 
78  hr = MSSTYLES_GetPropertyString(tp, val, sizeof(val)/sizeof(val[0]));
79  if(FAILED(hr))
80  return hr;
81  if(!MSSTYLES_LookupEnum(val, iPropId, piVal))
82  return E_PROP_ID_UNSUPPORTED;
83  return S_OK;
84 }
PTHEME_PROPERTY MSSTYLES_FindProperty(PTHEME_CLASS tc, int iPartId, int iStateId, int iPropertyPrimitive, int iPropertyId)
Definition: msstyles.c:835
#define E_HANDLE
Definition: winerror.h:2850
HRESULT hr
Definition: shlfolder.c:183
_In_ UINT64 _In_ UINT64 _In_ UINT64 _In_opt_ traverse_ptr * tp
Definition: btrfs.c:2694
#define TMT_ENUM
Definition: uxthemep.h:30
GLuint GLfloat * val
Definition: glext.h:7180
#define TRACE(s)
Definition: solgame.cpp:4
#define E_PROP_ID_UNSUPPORTED
Definition: vfwmsgs.h:173
__wchar_t WCHAR
Definition: xmlstorage.h:180
LONG HRESULT
Definition: typedefs.h:77
PTHEME_CLASS ValidateHandle(HTHEME hTheme)
Definition: system.c:717
#define S_OK
Definition: intsafe.h:59
BOOL MSSTYLES_LookupEnum(LPCWSTR pszValueName, int dwEnum, int *dwValue)
Definition: stylemap.c:1126
HRESULT MSSTYLES_GetPropertyString(PTHEME_PROPERTY tp, LPWSTR pszBuff, int cchMaxBuffChars)
Definition: msstyles.c:1140

Referenced by DrawThemeBackgroundEx(), DrawThemeText(), get_image_part_size(), GetThemeBackgroundContentRect(), GetThemeBackgroundExtent(), GetThemeBackgroundRegion(), GetThemePartSize(), IsThemeBackgroundPartiallyTransparent(), ThemeDrawCaptionText(), UXTHEME_DrawBackgroundFill(), UXTHEME_DrawGlyph(), UXTHEME_DrawImageBackground(), UXTHEME_DrawImageGlyph(), UXTHEME_LoadImage(), and UXTHEME_SelectImage().

◆ GetThemeFilename()

HRESULT WINAPI GetThemeFilename ( HTHEME  hTheme,
int  iPartId,
int  iStateId,
int  iPropId,
LPWSTR  pszThemeFilename,
int  cchMaxBuffChars 
)

Definition at line 89 of file property.c.

92 {
94  PTHEME_CLASS pClass = ValidateHandle(hTheme);
95 
96  TRACE("(%d, %d, %d)\n", iPartId, iStateId, iPropId);
97  if(!pClass)
98  return E_HANDLE;
99 
100  if(!(tp = MSSTYLES_FindProperty(pClass, iPartId, iStateId, TMT_FILENAME, iPropId)))
101  return E_PROP_ID_UNSUPPORTED;
102  return MSSTYLES_GetPropertyString(tp, pszThemeFilename, cchMaxBuffChars);
103 }
PTHEME_PROPERTY MSSTYLES_FindProperty(PTHEME_CLASS tc, int iPartId, int iStateId, int iPropertyPrimitive, int iPropertyId)
Definition: msstyles.c:835
#define E_HANDLE
Definition: winerror.h:2850
_In_ UINT64 _In_ UINT64 _In_ UINT64 _In_opt_ traverse_ptr * tp
Definition: btrfs.c:2694
#define TRACE(s)
Definition: solgame.cpp:4
#define E_PROP_ID_UNSUPPORTED
Definition: vfwmsgs.h:173
#define TMT_FILENAME
Definition: vssym32.h:140
PTHEME_CLASS ValidateHandle(HTHEME hTheme)
Definition: system.c:717
HRESULT MSSTYLES_GetPropertyString(PTHEME_PROPERTY tp, LPWSTR pszBuff, int cchMaxBuffChars)
Definition: msstyles.c:1140

◆ GetThemeFont()

HRESULT WINAPI GetThemeFont ( HTHEME  hTheme,
HDC  hdc,
int  iPartId,
int  iStateId,
int  iPropId,
LOGFONTW pFont 
)

Definition at line 108 of file property.c.

110 {
112  PTHEME_CLASS pClass = ValidateHandle(hTheme);
113 
114  TRACE("(%d, %d, %d)\n", iPartId, iStateId, iPropId);
115  if(!pClass)
116  return E_HANDLE;
117 
118  if(!(tp = MSSTYLES_FindProperty(pClass, iPartId, iStateId, TMT_FONT, iPropId)))
119  return E_PROP_ID_UNSUPPORTED;
120  return MSSTYLES_GetPropertyFont(tp, hdc, pFont);
121 }
PTHEME_PROPERTY MSSTYLES_FindProperty(PTHEME_CLASS tc, int iPartId, int iStateId, int iPropertyPrimitive, int iPropertyId)
Definition: msstyles.c:835
#define E_HANDLE
Definition: winerror.h:2850
_In_ UINT64 _In_ UINT64 _In_ UINT64 _In_opt_ traverse_ptr * tp
Definition: btrfs.c:2694
#define TMT_FONT
Definition: vssym32.h:144
#define TRACE(s)
Definition: solgame.cpp:4
#define E_PROP_ID_UNSUPPORTED
Definition: vfwmsgs.h:173
PTHEME_CLASS ValidateHandle(HTHEME hTheme)
Definition: system.c:717
HDC hdc
Definition: main.c:9
HRESULT MSSTYLES_GetPropertyFont(PTHEME_PROPERTY tp, HDC hdc, LOGFONTW *pFont)
Definition: msstyles.c:1066

Referenced by CB_ThemedPaint(), DrawThemeText(), GB_ThemedPaint(), GetThemeTextExtent(), GetThemeTextMetrics(), and CTrayClockWnd::OnThemeChanged().

◆ GetThemeInt()

HRESULT WINAPI GetThemeInt ( HTHEME  hTheme,
int  iPartId,
int  iStateId,
int  iPropId,
int piVal 
)

Definition at line 126 of file property.c.

128 {
130  PTHEME_CLASS pClass = ValidateHandle(hTheme);
131 
132  TRACE("(%d, %d, %d)\n", iPartId, iStateId, iPropId);
133  if(!pClass)
134  return E_HANDLE;
135 
136  if(!(tp = MSSTYLES_FindProperty(pClass, iPartId, iStateId, TMT_INT, iPropId)))
137  return E_PROP_ID_UNSUPPORTED;
138  return MSSTYLES_GetPropertyInt(tp, piVal);
139 }
PTHEME_PROPERTY MSSTYLES_FindProperty(PTHEME_CLASS tc, int iPartId, int iStateId, int iPropertyPrimitive, int iPropertyId)
Definition: msstyles.c:835
#define E_HANDLE
Definition: winerror.h:2850
_In_ UINT64 _In_ UINT64 _In_ UINT64 _In_opt_ traverse_ptr * tp
Definition: btrfs.c:2694
#define TRACE(s)
Definition: solgame.cpp:4
#define E_PROP_ID_UNSUPPORTED
Definition: vfwmsgs.h:173
PTHEME_CLASS ValidateHandle(HTHEME hTheme)
Definition: system.c:717
#define TMT_INT
Definition: vssym32.h:136
HRESULT MSSTYLES_GetPropertyInt(PTHEME_PROPERTY tp, int *piVal)
Definition: msstyles.c:1083

Referenced by get_border_background_size(), get_image_part_size(), get_led_gap(), get_led_size(), GetThemeBackgroundContentRect(), GetThemeBackgroundExtent(), UXTHEME_DrawBorderRectangle(), UXTHEME_LoadImage(), and UXTHEME_SelectImage().

◆ GetThemeIntList()

HRESULT WINAPI GetThemeIntList ( HTHEME  hTheme,
int  iPartId,
int  iStateId,
int  iPropId,
INTLIST *  pIntList 
)

Definition at line 144 of file property.c.

146 {
148  PTHEME_CLASS pClass = ValidateHandle(hTheme);
149 
150  TRACE("(%d, %d, %d)\n", iPartId, iStateId, iPropId);
151  if(!pClass)
152  return E_HANDLE;
153 
154  if(!(tp = MSSTYLES_FindProperty(pClass, iPartId, iStateId, TMT_INTLIST, iPropId)))
155  return E_PROP_ID_UNSUPPORTED;
156  return MSSTYLES_GetPropertyIntList(tp, pIntList);
157 }
PTHEME_PROPERTY MSSTYLES_FindProperty(PTHEME_CLASS tc, int iPartId, int iStateId, int iPropertyPrimitive, int iPropertyId)
Definition: msstyles.c:835
#define E_HANDLE
Definition: winerror.h:2850
#define TMT_INTLIST
Definition: vssym32.h:145
_In_ UINT64 _In_ UINT64 _In_ UINT64 _In_opt_ traverse_ptr * tp
Definition: btrfs.c:2694
#define TRACE(s)
Definition: solgame.cpp:4
#define E_PROP_ID_UNSUPPORTED
Definition: vfwmsgs.h:173
PTHEME_CLASS ValidateHandle(HTHEME hTheme)
Definition: system.c:717
HRESULT MSSTYLES_GetPropertyIntList(PTHEME_PROPERTY tp, INTLIST *pIntList)
Definition: msstyles.c:1097

◆ GetThemeMargins()

HRESULT WINAPI GetThemeMargins ( HTHEME  hTheme,
HDC  hdc,
int  iPartId,
int  iStateId,
int  iPropId,
RECT prc,
MARGINS pMargins 
)

Definition at line 216 of file property.c.

219 {
221  PTHEME_CLASS pClass = ValidateHandle(hTheme);
222 
223  TRACE("(%d, %d, %d)\n", iPartId, iStateId, iPropId);
224  memset (pMargins, 0, sizeof (MARGINS));
225  if(!pClass)
226  return E_HANDLE;
227 
228  if(!(tp = MSSTYLES_FindProperty(pClass, iPartId, iStateId, TMT_MARGINS, iPropId)))
229  return E_PROP_ID_UNSUPPORTED;
230  return MSSTYLES_GetPropertyMargins(tp, prc, pMargins);
231 }
PTHEME_PROPERTY MSSTYLES_FindProperty(PTHEME_CLASS tc, int iPartId, int iStateId, int iPropertyPrimitive, int iPropertyId)
Definition: msstyles.c:835
#define E_HANDLE
Definition: winerror.h:2850
HRESULT MSSTYLES_GetPropertyMargins(PTHEME_PROPERTY tp, RECT *prc, MARGINS *pMargins)
Definition: msstyles.c:1171
_In_ UINT64 _In_ UINT64 _In_ UINT64 _In_opt_ traverse_ptr * tp
Definition: btrfs.c:2694
#define TMT_MARGINS
Definition: vssym32.h:139
Definition: misc.c:279
#define TRACE(s)
Definition: solgame.cpp:4
#define E_PROP_ID_UNSUPPORTED
Definition: vfwmsgs.h:173
PTHEME_CLASS ValidateHandle(HTHEME hTheme)
Definition: system.c:717
_Out_ LPRECT prc
Definition: ntgdi.h:1658
#define memset(x, y, z)
Definition: compat.h:39

Referenced by DrawThemeBackgroundEx(), GetThemeBackgroundContentRect(), GetThemeBackgroundExtent(), CTrayNotifyWnd::OnThemeChanged(), paint_scrollbar(), PB_ThemedPaint(), TOOLBAR_Create(), and UXTHEME_DrawImageBackground().

◆ GetThemeMetric()

HRESULT WINAPI GetThemeMetric ( HTHEME  hTheme,
HDC  hdc,
int  iPartId,
int  iStateId,
int  iPropId,
int piVal 
)

Definition at line 236 of file property.c.

238 {
240  WCHAR val[60];
241  HRESULT hr;
242  PTHEME_CLASS pClass = ValidateHandle(hTheme);
243 
244  TRACE("(%d, %d, %d)\n", iPartId, iStateId, iPropId);
245  if(!pClass)
246  return E_HANDLE;
247 
248  if(!(tp = MSSTYLES_FindProperty(pClass, iPartId, iStateId, 0, iPropId)))
249  return E_PROP_ID_UNSUPPORTED;
250 
251  switch(tp->iPrimitiveType) {
252  case TMT_POSITION: /* Only the X coord is retrieved */
253  case TMT_MARGINS: /* Only the cxLeftWidth member is retrieved */
254  case TMT_INTLIST: /* Only the first int is retrieved */
255  case TMT_SIZE:
256  case TMT_INT:
257  return MSSTYLES_GetPropertyInt(tp, piVal);
258  case TMT_BOOL:
259  return MSSTYLES_GetPropertyBool(tp, piVal);
260  case TMT_COLOR:
261  return MSSTYLES_GetPropertyColor(tp, (COLORREF*)piVal);
262  case TMT_ENUM:
263  hr = MSSTYLES_GetPropertyString(tp, val, sizeof(val)/sizeof(val[0]));
264  if(FAILED(hr))
265  return hr;
266  if(!MSSTYLES_LookupEnum(val, iPropId, piVal))
267  return E_PROP_ID_UNSUPPORTED;
268  return S_OK;
269  case TMT_FILENAME:
270  /* Windows does return a value for this, but its value doesn't make sense */
271  FIXME("Filename\n");
272  break;
273  }
274  return E_PROP_ID_UNSUPPORTED;
275 }
PTHEME_PROPERTY MSSTYLES_FindProperty(PTHEME_CLASS tc, int iPartId, int iStateId, int iPropertyPrimitive, int iPropertyId)
Definition: msstyles.c:835
#define E_HANDLE
Definition: winerror.h:2850
#define TMT_BOOL
Definition: vssym32.h:137
HRESULT hr
Definition: shlfolder.c:183
#define TMT_INTLIST
Definition: vssym32.h:145
_In_ UINT64 _In_ UINT64 _In_ UINT64 _In_opt_ traverse_ptr * tp
Definition: btrfs.c:2694
#define TMT_MARGINS
Definition: vssym32.h:139
#define FIXME(fmt,...)
Definition: debug.h:110
#define TMT_ENUM
Definition: uxthemep.h:30
HRESULT MSSTYLES_GetPropertyBool(PTHEME_PROPERTY tp, BOOL *pfVal)
Definition: msstyles.c:983
GLuint GLfloat * val
Definition: glext.h:7180
#define TRACE(s)
Definition: solgame.cpp:4
#define E_PROP_ID_UNSUPPORTED
Definition: vfwmsgs.h:173
__wchar_t WCHAR
Definition: xmlstorage.h:180
LONG HRESULT
Definition: typedefs.h:77
DWORD COLORREF
Definition: windef.h:285
#define TMT_FILENAME
Definition: vssym32.h:140
PTHEME_CLASS ValidateHandle(HTHEME hTheme)
Definition: system.c:717
HRESULT MSSTYLES_GetPropertyColor(PTHEME_PROPERTY tp, COLORREF *pColor)
Definition: msstyles.c:996
#define S_OK
Definition: intsafe.h:59
#define TMT_INT
Definition: vssym32.h:136
HRESULT MSSTYLES_GetPropertyInt(PTHEME_PROPERTY tp, int *piVal)
Definition: msstyles.c:1083
#define TMT_POSITION
Definition: vssym32.h:142
BOOL MSSTYLES_LookupEnum(LPCWSTR pszValueName, int dwEnum, int *dwValue)
Definition: stylemap.c:1126
#define TMT_COLOR
Definition: vssym32.h:138
HRESULT MSSTYLES_GetPropertyString(PTHEME_PROPERTY tp, LPWSTR pszBuff, int cchMaxBuffChars)
Definition: msstyles.c:1140
#define TMT_SIZE
Definition: vssym32.h:141

◆ GetThemePosition()

HRESULT WINAPI GetThemePosition ( HTHEME  hTheme,
int  iPartId,
int  iStateId,
int  iPropId,
POINT pPoint 
)

Definition at line 162 of file property.c.

164 {
166  PTHEME_CLASS pClass = ValidateHandle(hTheme);
167 
168  TRACE("(%d, %d, %d)\n", iPartId, iStateId, iPropId);
169  if(!pClass)
170  return E_HANDLE;
171 
172  if(!(tp = MSSTYLES_FindProperty(pClass, iPartId, iStateId, TMT_POSITION, iPropId)))
173  return E_PROP_ID_UNSUPPORTED;
174  return MSSTYLES_GetPropertyPosition(tp, pPoint);
175 }
PTHEME_PROPERTY MSSTYLES_FindProperty(PTHEME_CLASS tc, int iPartId, int iStateId, int iPropertyPrimitive, int iPropertyId)
Definition: msstyles.c:835
#define E_HANDLE
Definition: winerror.h:2850
_In_ UINT64 _In_ UINT64 _In_ UINT64 _In_opt_ traverse_ptr * tp
Definition: btrfs.c:2694
#define TRACE(s)
Definition: solgame.cpp:4
#define E_PROP_ID_UNSUPPORTED
Definition: vfwmsgs.h:173
PTHEME_CLASS ValidateHandle(HTHEME hTheme)
Definition: system.c:717
#define TMT_POSITION
Definition: vssym32.h:142
HRESULT MSSTYLES_GetPropertyPosition(PTHEME_PROPERTY tp, POINT *pPoint)
Definition: msstyles.c:1116

Referenced by DrawThemeText(), and UXTHEME_SelectImage().

◆ GetThemePropertyOrigin()

HRESULT WINAPI GetThemePropertyOrigin ( HTHEME  hTheme,
int  iPartId,
int  iStateId,
int  iPropId,
PROPERTYORIGIN *  pOrigin 
)

Definition at line 280 of file property.c.

282 {
284  PTHEME_CLASS pClass = ValidateHandle(hTheme);
285 
286  TRACE("(%d, %d, %d)\n", iPartId, iStateId, iPropId);
287  if(!pClass)
288  return E_HANDLE;
289 
290  if(!(tp = MSSTYLES_FindProperty(pClass, iPartId, iStateId, 0, iPropId))) {
291  *pOrigin = PO_NOTFOUND;
292  return S_OK;
293  }
294  *pOrigin = tp->origin;
295  return S_OK;
296 }
PTHEME_PROPERTY MSSTYLES_FindProperty(PTHEME_CLASS tc, int iPartId, int iStateId, int iPropertyPrimitive, int iPropertyId)
Definition: msstyles.c:835
#define E_HANDLE
Definition: winerror.h:2850
_In_ UINT64 _In_ UINT64 _In_ UINT64 _In_opt_ traverse_ptr * tp
Definition: btrfs.c:2694
#define TRACE(s)
Definition: solgame.cpp:4
PTHEME_CLASS ValidateHandle(HTHEME hTheme)
Definition: system.c:717
#define S_OK
Definition: intsafe.h:59

◆ GetThemeRect()

HRESULT WINAPI GetThemeRect ( HTHEME  hTheme,
int  iPartId,
int  iStateId,
int  iPropId,
RECT pRect 
)

Definition at line 180 of file property.c.

182 {
184  PTHEME_CLASS pClass = ValidateHandle(hTheme);
185 
186  TRACE("(%d, %d, %d)\n", iPartId, iStateId, iPropId);
187  if(!pClass)
188  return E_HANDLE;
189 
190  if(!(tp = MSSTYLES_FindProperty(pClass, iPartId, iStateId, TMT_RECT, iPropId)))
191  return E_PROP_ID_UNSUPPORTED;
192  return MSSTYLES_GetPropertyRect(tp, pRect);
193 }
PTHEME_PROPERTY MSSTYLES_FindProperty(PTHEME_CLASS tc, int iPartId, int iStateId, int iPropertyPrimitive, int iPropertyId)
Definition: msstyles.c:835
#define E_HANDLE
Definition: winerror.h:2850
_In_ UINT64 _In_ UINT64 _In_ UINT64 _In_opt_ traverse_ptr * tp
Definition: btrfs.c:2694
#define TMT_RECT
Definition: vssym32.h:143
#define TRACE(s)
Definition: solgame.cpp:4
#define E_PROP_ID_UNSUPPORTED
Definition: vfwmsgs.h:173
PTHEME_CLASS ValidateHandle(HTHEME hTheme)
Definition: system.c:717
HRESULT MSSTYLES_GetPropertyRect(PTHEME_PROPERTY tp, RECT *pRect)
Definition: msstyles.c:1151

◆ GetThemeString()

HRESULT WINAPI GetThemeString ( HTHEME  hTheme,
int  iPartId,
int  iStateId,
int  iPropId,
LPWSTR  pszBuff,
int  cchMaxBuffChars 
)

Definition at line 198 of file property.c.

200 {
202  PTHEME_CLASS pClass = ValidateHandle(hTheme);
203 
204  TRACE("(%d, %d, %d)\n", iPartId, iStateId, iPropId);
205  if(!pClass)
206  return E_HANDLE;
207 
208  if(!(tp = MSSTYLES_FindProperty(pClass, iPartId, iStateId, TMT_STRING, iPropId)))
209  return E_PROP_ID_UNSUPPORTED;
210  return MSSTYLES_GetPropertyString(tp, pszBuff, cchMaxBuffChars);
211 }
PTHEME_PROPERTY MSSTYLES_FindProperty(PTHEME_CLASS tc, int iPartId, int iStateId, int iPropertyPrimitive, int iPropertyId)
Definition: msstyles.c:835
#define E_HANDLE
Definition: winerror.h:2850
_In_ UINT64 _In_ UINT64 _In_ UINT64 _In_opt_ traverse_ptr * tp
Definition: btrfs.c:2694
#define TMT_STRING
Definition: vssym32.h:135
#define TRACE(s)
Definition: solgame.cpp:4
#define E_PROP_ID_UNSUPPORTED
Definition: vfwmsgs.h:173
PTHEME_CLASS ValidateHandle(HTHEME hTheme)
Definition: system.c:717
HRESULT MSSTYLES_GetPropertyString(PTHEME_PROPERTY tp, LPWSTR pszBuff, int cchMaxBuffChars)
Definition: msstyles.c:1140