To keep the cursor inside your window use the SetCapture and ClipCursor functions. I am not shore how they work as i have not used them yet but the win docs say they are used by paint progs to keep the cursor inside the window while drawing lines etc. there is an eg. in the ''win32 programmers reference'' that demonstrates what to do. enter ''Drawing Lines with the Mouse'' into the index to find it.
you could also use GetCursorPos(POINT) and SetCursorPos(320,240) to keep it ''under your control''
dose that help/confuse you?
- Jono AH
Window programming questions
Thanks, thats just what i needed.
One more question before I make your brain melt. How do I get the coordinates of my window in windowed mode ?
One more question before I make your brain melt. How do I get the coordinates of my window in windowed mode ?
GetWindowRect for the outer coordinates
GetClientRect for the coordinates of the part without borders and titlebar and that stuff
"take a look around" - limp bizkit
www.google.com
GetClientRect for the coordinates of the part without borders and titlebar and that stuff
"take a look around" - limp bizkit
www.google.com
it accepts a *POINT, so you put a &POINT into it.
but when you declare it you just do POINT myPoint. not POINT* pmyPoint. the POINT will contain a x and a y value.
.lick
but when you declare it you just do POINT myPoint. not POINT* pmyPoint. the POINT will contain a x and a y value.
.lick
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement