For an app that uses theming (UXTheme), I ran into this situation:
within a function only getting as parameters:
hTheme: HTHEME;
hdc: HDC; <some-others>
I’d need to find out the wincontrol resp. wincontrol’s handle to which the action belongs to..
Tried several strategies, beneath those:
aResult := GetThemePosition(hTheme, iPartId, iStateId, aPropId, aPoint);
I never got any reasonable result for that. Same e.g. as for:
aResult := GetThemeRect (hTheme, iPartId, iStateId, aPropId, aRect);
My question: is there anybody who ever got those two functions to work ?
(Besides: WindowFromDC -- hwnd := WindowFromDC(hdc); -- wont’t work either, because the device context isn’t directly bound to a hwnd).