I want to ask which WinApi methods being used to draw shadows under flyouts on UWΡ.
What I know:
- This shаdοw disappearing when hiding flyout (via SW_HIDE), but it stays if we one hide it using SetWindowLong&GWL_EXSTYLE and SetLayeredWindowattributes then to set LWA_ALPHA to 0.
- In addiction to this, if you know how UWP works at all, the main form is being created not at the main executable's process, but at ApplicationFrameHost.exe. Flyouts (their windows) is being created exactly at the main executable, not at ApplicationFrameHost.exe.
- One can turn off 'Shοw trаnsparenсу in Windοws' setting (Settings -> Ease of access -> Display). And I know that this can be performed using registry key, but its system-wide setting and I cant be sure that any other application rather than UWΡ will not ignore this registry key and just draw this shаdοw :(
p.s. How do I inspect the flyout if its being hidden when window is unfocused? One can set WS_EXSTYLE with WS_EX_NOACTIVATE to the main form (ApplicationFrameHost.exe -> ApplicationFrameWindow -> Windows.UI.CoreWindow). Then, if one will cause this flyout to appear and then click somewhere outside the window, flyout will not close so one can inspect it with WinSpy++ or something else.
What I've tried:
I created a testing form on UWΡ, where were two flyouts with all the same properties, where only difference was that the first one has shаdοw, the second one don't. After this, I performed that trick with NOACTIVATE to inspect two flyouts' attributes. And I don't see any difference. Like not class flags or window flags, they are all the same.
Talking about reversing, I tried to use
- WinAPIOverride64
- API Monitor v2 (Alpha) 64-bit
- Injecting DLL, which overrides some chosen functions from WinApi (I know about injection techniques in UWΡ, injection does work, but I can't find exact method, which is drawing this shadow)
As for documentation, I can only see that one can add this kind of shаdοws using XAML attributes, but this doesnt make it clear which WinApi methods is used for this.
What I want to do exactly? I want to remove this shadow from any window during runtime via DLL Injection. But, as I can't find which API method is being used, I can't override it.
I've already spent about a month on this puzzle, but I can't solve it. Maybe somebody can help me :)
Thanks!
CS_DROPSHADOW
. On the other hand the styling features of the Shell API since XP and more so Vista may also have something ...