Trying to write a c++ console program to change a setting controlled by a windows checkbox

213 views Asked by At

Is it possible to create a keyboard shortcut to switch between the monitor and portion selection of this wacom preferences window, via a c++ console program?

Wacom_Prefs

Sorry if this is poorly worded, I've had trouble trying to find the right words to search for ways to do it.

1

There are 1 answers

0
kvr On BEST ANSWER

I think it should be possible, although a bit tedious. You should be able to use the Windows API, and try to EnumWindows/EnumDesktopWindows to identify the respective application Window, and its respective controls (which are also Windows). You should identify the window title, and class ids, for the app window, and the checkbox button controls, then when you enumerate through all the desktop windows, you can identify the ones you are interested in. Then you can use the SendMessage() API to send messages to the controls (Windows) of interest to manipulate them. It's a bit tedious, but sounds possible.

An example of use here to get an idea: http://www.cplusplus.com/forum/windows/25280/