win32-darkmode icon indicating copy to clipboard operation
win32-darkmode copied to clipboard

Use with mingw64 (no SDK)

Open TheGreatRambler opened this issue 4 years ago • 4 comments

I wish to use this with the mingw64 api, which has the Windows headers but not the Windows SDK headers. In addition, if there was an easy way to call this as a function from a header to apply to any window, that would be awesome to know.

TheGreatRambler avatar Feb 19 '20 03:02 TheGreatRambler

What is "has the Windows headers but not the Windows SDK headers"? What errors did you get? I don't use mingw, maybe later when I have time I will test it.

to apply to any window

This is not easy to do, maybe by hooking CreateWindowEx. But I don't think it's a good solution.

ysc3839 avatar Feb 19 '20 10:02 ysc3839

I don't exactly recall which headers, but a few were not present on my machine. I looked them up and it stated that they were a part of the Windows SDK. I have certain headers, like Windows.h however. When I say any window, I still have access to the window on creation, using wxwidgets, and I am able to obtain the hWnd, which I noticed this library takes as an argument to apply dark mode.

TheGreatRambler avatar Feb 23 '20 15:02 TheGreatRambler

Applying darkmode on top-level window is not enough. You have to apply to every child window. If you have the hWnd of top-level window, you can do a recursive enum of child window.

ysc3839 avatar Feb 23 '20 16:02 ysc3839

What functions in DarkMode.h would I have to use on each child window?

TheGreatRambler avatar Feb 24 '20 03:02 TheGreatRambler