Hide Mouse Only "In" Window? (Win32/C++)

Started by
1 comment, last by ajm113 16 years, 1 month ago
How can I hide the mouse if it's in side of the window then the window's boarders? So the user can see where the mouse is if the user is trying too close the window or minimize it from it's boarders?
Check out my open source code projects/libraries! My Homepage You may learn something.
Advertisement
Use ShowCursor. Call it during WM_SETCURSOR, but check the hit area for HTCLIENT.

Only if the hit area code is HTCLIENT you can hide the cursor, in all other cases show it. This way the mouse arrow is visible on the border and caption of the window.

Note that ShowCursor keeps track of the number of calls, so you need to make sure you only call ShowCursor once per hide/show.

Fruny: Ftagn! Ia! Ia! std::time_put_byname! Mglui naflftagn std::codecvt eY'ha-nthlei!,char,mbstate_t>

Can you maybe post a source code or something a bit more so I know what too do? Sorry I'm a Win32 Rookie!
Check out my open source code projects/libraries! My Homepage You may learn something.

This topic is closed to new replies.

Advertisement