Skip to main content
GameDev.net gamedev.net
🔒 Locked

DirectDraw mousemove question

Started by Olek Jan 15, 2000 at 1:58 PM 1 replies 550+ views
Original Post
Olek
Olek
Lets say that I have DirectDraw game and I blt some image as a button. When user move the mouse over this image I want to change it. Do I have to use general WM_MOUSEMOVE message and check x and y values of mouse cursor or can I do it faster and better. Please help me in this problem and I''d be grateful for any code examples. Olek, olo_b@poczta.onet.pl.
Olek, olo_b@poczta.onet.pl.
crent
crent
Use DirectInput then in get the x and y position of the "mouse" every frame and check if it is "over" that image. If so change it. I don''t think there is another way.

-crent-
Olek
Olek
I thought so too at the beginning, but then I thought that if I would have 20 buttons it would be slow to check in each WM_MOUSEMOVE event x and y coordinates and buttons borders.

Anyway, a lot of thanks to you

Olek, olo_b@poczta.onet.pl.
Olek, olo_b@poczta.onet.pl.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.