- appeon pb
- PowerBuilder
- Friday, 17 November 2023 06:33 AM UTC
Hi,guys:
I use DwmGetColorizationColor to get windows theme color, like this:
Function Long DwmGetColorizationColor( Ref Ulong pcrColorization, Ref boolean pfOpaqueBlend ) LIBRARY "Dwmapi.dll"
the return color value type is Colorref, neet to do convert
C++ code :
COLORREF GetWindowsThemeColor()
{
DWORD crColorization;
BOOL fOpaqueBlend;
COLORREF theme_color{};
HRESULT result = DwmGetColorizationColor(&crColorization, &fOpaqueBlend);
if (result == S_OK)
{
BYTE r, g, b;
r = (crColorization >> 16) % 256;
g = (crColorization >> 8) % 256;
b = crColorization % 256;
theme_color = RGB(r, g, b);
}
return theme_color;
}
I dont know how to do this in pb : left shist >>
Find Questions by Tag
Helpful?
If a reply or comment is helpful for you, please don’t hesitate to click the Helpful button. This action is further confirmation of their invaluable contribution to the Appeon Community.