1. appeon pb
  2. PowerBuilder
  3. 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 >>

René Ullrich Accepted Answer Pending Moderation
  1. Friday, 17 November 2023 09:20 AM UTC
  2. PowerBuilder
  3. # 1

You can replace left shift or right shift operators by mathematical operations.

https://www.geeksforgeeks.org/left-shift-right-shift-operators-c-cpp/ 

HTH,

René

Comment
There are no comments made yet.
appeon pb Accepted Answer Pending Moderation
  1. Saturday, 18 November 2023 13:56 PM UTC
  2. PowerBuilder
  3. # 2

thank you René Ullrich;

Comment
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.