Invert colors in Windows by specific window, each one.

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
Suiyen
Posts: 8
Joined: 07 Feb 2021, 14:51

Invert colors in Windows by specific window, each one.

Post by Suiyen » 14 Mar 2021, 14:21

Thanks for stand here! Mi English is Google Translate, sorry about that

Hi, I would like to know if there is any possibility that the Windows function (Invert colors), is applied by each application, program or window; and not about the entire system or screen ...

I have tried everything, from an app called "Negative Screen", another called "Easy Invert", hundreds of consulted forums and I can't find the solution. I'm a programmer but not very advanced in this specific kind of thing.

I also use AutoHotKey, and if there is any existing command to do this, PERSISTENTLY, it would be heaven!

I need it for an application that is impossible to put in dark mode.

If said app is placed in High Contrast, another Windows function, it looks horrible and does not allow me to work.

Inverting colors is the only viable way for this.

Is there an expert programmer to help me? Or teach a course on this?

malcev
Posts: 1769
Joined: 12 Aug 2014, 12:37

Re: Invert colors in Windows by specific window, each one.

Post by malcev » 14 Mar 2021, 17:22

You can try to do it with magnification api.
But it will work only if all windows count will be less than 25.
Or make print screen of this window and place in front of it modified screenshot.
If window can have topmost child windows then You can do it with non-documented createwindowinband api.

Suiyen
Posts: 8
Joined: 07 Feb 2021, 14:51

Re: Invertir colores en Windows por ventana específica, cada uno.

Post by Suiyen » 14 Mar 2021, 17:58

malcev wrote:
14 Mar 2021, 17:22
You can try to do it with magnification api.
But it will work only if all windows count will be less than 25.
Or make print screen of this window and place in front of it modified screenshot.
If window can have topmost child windows then You can do it with non-documented createwindowinband api.
Could you explain me better?
I did not understand anything, excuse me, I have never used these tools, I know that the magnifying glass is a good option, but as I mentioned, the action covers the entire screen and this is not exactly what I am looking for, I am looking for it to only cover a single sale or application specific

malcev
Posts: 1769
Joined: 12 Aug 2014, 12:37

Re: Invert colors in Windows by specific window, each one.

Post by malcev » 14 Mar 2021, 18:07

If You did not understand anything then it is may be too early for You to write such complex things.
Start read here
https://www.autohotkey.com/boards/viewtopic.php?t=6517
After that search forum and google for words that You dont understand from my answer.

Suiyen
Posts: 8
Joined: 07 Feb 2021, 14:51

Re: Invert colors in Windows by specific window, each one.

Post by Suiyen » 14 Mar 2021, 18:40

malcev wrote:
14 Mar 2021, 18:07
If You did not understand anything then it is may be too early for You to write such complex things.
Start read here
https://www.autohotkey.com/boards/viewtopic.php?t=6517
After that search forum and google for words that You dont understand from my answer.
Look at this code:

Code: Select all

hDC := DllCall("GetDC", "Uint", 0)
DllCall("BitBlt", "Uint", hDC, "int", 0, "int", 0, "int", A_ScreenWidth, "int", A_ScreenHeight
                , "Uint", 0, "int", 0, "int", 0, "Uint", 0x00550009)
DllCall("ReleaseDC", "Uint", 0, "Uint", hDC)
[Mod edit: [code][/code] tags added.]


It works with a simple key and that's it
This works only once and that's it, and you can change the width of the screen you want to color.
Does the link you sent me work on this?

malcev
Posts: 1769
Joined: 12 Aug 2014, 12:37

Re: Invert colors in Windows by specific window, each one.

Post by malcev » 14 Mar 2021, 18:47

I dont understand You. Read my link.

Suiyen
Posts: 8
Joined: 07 Feb 2021, 14:51

Re: Invert colors in Windows by specific window, each one.

Post by Suiyen » 14 Mar 2021, 20:57

malcev wrote:
14 Mar 2021, 18:47
I dont understand You. Read my link.
I'm going to explain this better
The article sent by you works to draw figures using ATH tools, right?
I do not want to make drawings or figures.
I want to have a dark mode in a Windows application
This is possible with negative colors.
I want it with negative colors, I long for it.
But, I want the effect ONLY in the app. Not on the whole screen.
Any way for this?

malcev
Posts: 1769
Joined: 12 Aug 2014, 12:37

Re: Invert colors in Windows by specific window, each one.

Post by malcev » 14 Mar 2021, 21:16

The article sent by you works to draw figures using ATH tools, right?
No. It is ahk wrapper of gdi+.
And with gdi+ You can get dc of Your target window and transfer it to new window, that will be on top of target.
I think You need read and learn this api or just wait if anybody wants to do it instead of You.

Suiyen
Posts: 8
Joined: 07 Feb 2021, 14:51

Re: Invert colors in Windows by specific window, each one.

Post by Suiyen » 14 Mar 2021, 21:46

malcev wrote:
14 Mar 2021, 21:16
The article sent by you works to draw figures using ATH tools, right?
And with gdi+ You can get dc of Your target window and transfer it to new window, that will be on top of target.
Thank you thank you very much.
I don't understand anything at all in that thread.
Do you think I did it?
So, as you say.
And get my dark theme?

A question, and... What is "dc"?
I still read this thread


davidhj
Posts: 5
Joined: 01 Oct 2020, 06:54

Re: Invert colors in Windows by specific window, each one.

Post by davidhj » 02 Dec 2022, 09:31

This seems a good quesiton. Any update yet?


Post Reply

Return to “Ask for Help (v1)”