EDN Admin
Well-known member
Visual Studio 2005<br/>
Vista - WIN32 (no MFC)
Hi.<br/>
Im not sure if this is the most appropriate place to post this question.
Im trying to use the cursor to draw a rectangle anwhere on the screen, including the taskbar etc., so that I can average the pixel colours within the rectangle.<br/>
The drawing should work in a similar way to Vistas snipping tool.
The problem Im having is stopping the cursor reacting with the other applications outside my window, or even my own menu buttons.<br/>
(For example, If I click outside my window, I want it to start drawing rather than changing focus.)
Im really after some general advice on the best way to go about it.<br/>
I have tried SetCapture( ) and SetWindowsHookEx( ) from within my own thread but havent tried SetWindowsHookEx( ) from within a DLL.<br/>
As Im not very familiar with DLLs, I want to know if this is the best way to go before delving into it.
Creating a borderless window the same size as the screen and blitting the screen to that is another alternative, but that is just as vague to me as DLLs. Would it cover the taskbar? How do you get rid of the borders?<br/>
Also, I would like it to be compatible with Windows XP.<br/>
<br/>
Anyway as I said, Im after advice on the most appropriate technique.<br/>
Thanks.
View the full article
Vista - WIN32 (no MFC)
Hi.<br/>
Im not sure if this is the most appropriate place to post this question.
Im trying to use the cursor to draw a rectangle anwhere on the screen, including the taskbar etc., so that I can average the pixel colours within the rectangle.<br/>
The drawing should work in a similar way to Vistas snipping tool.
The problem Im having is stopping the cursor reacting with the other applications outside my window, or even my own menu buttons.<br/>
(For example, If I click outside my window, I want it to start drawing rather than changing focus.)
Im really after some general advice on the best way to go about it.<br/>
I have tried SetCapture( ) and SetWindowsHookEx( ) from within my own thread but havent tried SetWindowsHookEx( ) from within a DLL.<br/>
As Im not very familiar with DLLs, I want to know if this is the best way to go before delving into it.
Creating a borderless window the same size as the screen and blitting the screen to that is another alternative, but that is just as vague to me as DLLs. Would it cover the taskbar? How do you get rid of the borders?<br/>
Also, I would like it to be compatible with Windows XP.<br/>
<br/>
Anyway as I said, Im after advice on the most appropriate technique.<br/>
Thanks.
View the full article