Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Anyone ever played with OpenThemeData() ?
Message
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01080536
Message ID:
01080559
Views:
22
Frank,

See if this message is of any help
Re: API ProgressBar, no XP theme Thread #1074182 Message #1074774

>I do have a custom control that mimics a combo-Box (with a datepick-Calendar). Works fabulous but does not look like standard XP-controls. I have finally managed to get the dropdown-button being a combobox-button but
>the control's border still simply is black instead of the correct combo-border-color.
>
>To query this, I tried to play with the uxTheme.dll witch is poorly documented. At least in all the google-world noone ever seems to have used it with vfp.
>
>I would need to use the functions
>
>OpenThemeData()
>GetThemeColor()
>CloseThemeData()
>
>
>in order to achieve what I want.
>
>however OpenThemeData always returns a handle of 0.
>
>Tried several things with bits I found in the net.
>
>current code is something like this:
>
>#define handle long
>
>declare long IsThemeActive in uxtheme.dll
>*declare handle OpenThemeData in uxtheme.dll long hWnd, long pszClasslist
>declare handle OpenThemeData in uxtheme.dll long hWnd, string pszClasslist
>declare integer CloseThemeData in uxtheme.dll long hTheme
>declare integer GetThemeColor in uxtheme.dll long hTheme, integer iPartID, integer iStateID, integer iPropID, string @ COLORREF
>
>
>acti screen
>
>if IsThemeActive() # 1
>    return
>else
>
>    lnHandle = .null.
>    lnHandle = OpenThemeData(_vfp.HWnd, "COMBOBOX")
>
>    *lnHandle = OpenThemeData(_vfp.HWnd, loIconBuddy.String2Long("COMBOBOX"))
>
>    ?lnHandle
>
>
>    lcColor = DWord(0)
>    ? GetThemeColor(lnHandle, 0, 1, 3801, @lcColor)
>
>    ? DWord2Num(lcColor)
>
>    ? CloseThemeData(lnHandle)
>
>endif
>
>
>thx for any help on this
>
>Merry Christmas
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform