Archived

This topic is now archived and is closed to further replies.

Malikive

Mouse Input Question

Recommended Posts

Heya Everyone, I''m trying to write a level editor for my 2D game with DirectDraw and I''m using DirectInput for mouse input, but I can''t seem to find a way to relate the relative mouse coordinates with the client area of my windowed application. I''m tryin to simulate Microsoft Paint in a way, where there are a few icons on the left side to choose from that you can select and then plot on the right side in a grid system to build the level. My problem is that I can''t relate the mouse coordinates. Are my methods of doing this program correct or should I stick with Windows programming rather than DirectX for input? Any help would be appreciated and if anything is unclear or you have any questiosn, feel free to ask. Thanks! -Josh-

Share this post


Link to post
Share on other sites
Kinda sad when I frustrate myself all day and then find a possible solution 20 mins after I post on here..hehe

I think what I''m going to do is use my WinProc function and use the WM_LBUTTONDOWN and WM_LBUTTONMOVE to solve my problem. If this seems reasonable, an approval would be awesome, if any other suggestions are out there, lemme know!

-Josh-

Share this post


Link to post
Share on other sites
The WM_ mouse messages would be the easiest for your purpose. You can use DirectInput if you handle all mouse functionalities yourself, including moving and rendering the cursor.

Share this post


Link to post
Share on other sites