HIWORD and LOWORD not recognized

Started by
3 comments, last by TheBlackJester 21 years, 7 months ago
Hey, I''m just throwing in some basic mouse support and my code looks like this In the WndProc()


case WM_MOUSEMOVE:

mousePosX = LOWORD[lParam];
mousePosY = HIWORD[lParam];

return 0;
break;

 
And I''m gettin an undeclared identifier message on HIWORD and LOWORD Anyone know whats up?

"With my feet upon the ground I lose myself between the sounds and open wide to suck it in, I feel it move across my skin. I''m reaching up and reaching out. I''m reaching for the random or what ever will bewilder me, what ever will bewilder me. And following our will and wind we may just go where no one''s been. We''ll ride the spiral to the end and may just go where no one''s been." - Maynard James Keenan [TheBlackJester ] [Wildfire Studios ]

"With my feet upon the ground I lose myself between the sounds and open wide to suck it in, I feel it move across my skin. I'm reaching up and reaching out. I'm reaching for the random or what ever will bewilder me, what ever will bewilder me. And following our will and wind we may just go where no one's been. We'll ride the spiral to the end and may just go where no one's been." - Maynard James Keenan Name: [email=darkswordtbj@hotmail.com]TheBlackJester[/email]Team: Wildfire Games
Projects O A.D.The Last Alliance

Advertisement
How about HIWORD(lparam) and LOWORD(lparam) ?

Documents [ GDNet | MSDN | STL | OpenGL | Formats | RTFM | Asking Smart Questions ]
C++ Stuff [ MinGW | Loki | SDL | Boost. | STLport | FLTK | ACCU Recommended Books ]
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." — Brian W. Kernighan
They're macros. Use parentheses instead of square brackets.

EDIT: 18 seconds! Darn you Fruny

[edited by - zealouselixir on August 31, 2002 10:15:32 PM]

[twitter]warrenm[/twitter]

Thnx, I just figured that out and was gonna edit the post but you beat me to it

Thanx for the replies


"With my feet upon the ground I lose myself between the sounds and open wide to suck it in, I feel it move across my skin. I''m reaching up and reaching out. I''m reaching for the random or what ever will bewilder me, what ever will bewilder me. And following our will and wind we may just go where no one''s been. We''ll ride the spiral to the end and may just go where no one''s been." - Maynard James Keenan [TheBlackJester ]
[Wildfire Studios ]

"With my feet upon the ground I lose myself between the sounds and open wide to suck it in, I feel it move across my skin. I'm reaching up and reaching out. I'm reaching for the random or what ever will bewilder me, what ever will bewilder me. And following our will and wind we may just go where no one's been. We'll ride the spiral to the end and may just go where no one's been." - Maynard James Keenan Name: [email=darkswordtbj@hotmail.com]TheBlackJester[/email]Team: Wildfire Games
Projects O A.D.The Last Alliance

Before you do that, let me suggest this:

GET_X_LPARAM
The GET_X_LPARAM macro retrieves the signed x-coordinate from the given LPARAM value.

int GET_X_LPARAM(
LPARAM lParam
);

GET_Y_LPARAM
The GET_Y_LPARAM macro retrieves the signed y-coordinate from the given LPARAM value.

int GET_Y_LPARAM(
LPARAM lParam
);

Incase your coordinates aren''t zero based in the upper left hand corner.

This topic is closed to new replies.

Advertisement