News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Mouse Fun

Started by OceanJeff32, September 25, 2005, 04:26:10 AM

Previous topic - Next topic

OceanJeff32

Well, tonight I'm having too much fun with the mouse!

The "game" is becoming playable.

The Windows Procedure shows a good example of capturing and using simple messages from the mouse:

WM_MOUSEMOVE
WM_LBUTTONDOWN
WM_RBUTTONDOWN

I happened upon this tonight on msdn online, and decided to have a little fun, I wasn't even going to put in mouse movement until later!

Click on the Left Button and the ball changes position to match the mouse pointer.

Click on the Right Button and the "paddle" changes direction, so you can play breakout style, or tennis style!

The mouse's movements are tracked and displayed on the Window Status Bar.

Enjoy,

Jeff C
:U
P.S. The Windows GDI seems to be quite flexible and versatile, or should I say functional!  I thought it would be much clumsier, from what I've heard studying with Direct X and JAVA gurus.

Windows isn't as bad as they say it is, in fact, compared to direct input, this mouse processing with messages was far easier!!

[attachment deleted by admin]
Any good programmer knows, every large and/or small job, is equally large, to the programmer!