BOswalt
April 19th, 2005, 12:12 PM
I am working for a company that builds ships and needs to run applications at night. The bottom line is that at night, the window backgrounds should show up as black, and the foreground text should show up as white.
Is there any way to change the text color of static controls system wide on Windows XP? At first, I thought I could use the WH_CALLWNDPROCRET hook with the WM_CTLCOLORSTATIC message, but my hook doesn't receive the WM_CTLCOLORSTATIC message, and even if it did, on Win XP, the API says that you can't modify the return value of the send message.
I have thought about catching the WM_CREATE message with a hook, checking the window class name to see if it is a static, and then setting its window proc to my special proc, but that means I'll be doing all of the drawing for the static control, and if someone else is running an app that contains a subclassed static, then things won't work right for them.
Is there another way to do this that I am not thinking of? Basically,
Is there any way to change the text color of static controls system wide on Windows XP? At first, I thought I could use the WH_CALLWNDPROCRET hook with the WM_CTLCOLORSTATIC message, but my hook doesn't receive the WM_CTLCOLORSTATIC message, and even if it did, on Win XP, the API says that you can't modify the return value of the send message.
I have thought about catching the WM_CREATE message with a hook, checking the window class name to see if it is a static, and then setting its window proc to my special proc, but that means I'll be doing all of the drawing for the static control, and if someone else is running an app that contains a subclassed static, then things won't work right for them.
Is there another way to do this that I am not thinking of? Basically,