Archived

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

Mouse Wheel Help in windowz...

This topic is 6020 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

...Hey i am having a little trouble with the mouse wheel functions in windows. I put case WM_MOUSEWHEEL: in my message system, and when i compile, it says that WM_MOUSEWHEEL is an undeclared indentifier. I am assumming that i am missing some windows header files or something. Which doesnt make sense, since WM_LBUTTONUP and all the others work fine. I have looked around and didn''t find much help, i hope i am just doing something utterly wrong here and so stupid that someone will bust on me for it, but anyway, any help is appreciated, thanks, later- what we do in life... echoes in eternity...

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
WM_MOUSEWHEEL should work. Check your code again.

Share this post


Link to post
Share on other sites
well there really wasnt much code to it, i just inserted it into my message loop
like so (its towards the bottom):
LRESULT CALLBACK MessageLoop (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
{
int mouseX;
int mouseY;


switch(message)
{
case WM_ACTIVATEAPP:
ActiveApp = wParam;
break;

case WM_DESTROY:
ShowCursor (TRUE);
PostQuitMessage(0);
break;
case WM_KEYDOWN:
switch(wParam)
{
case VK_TAB:
if(CONSOLE_MANAGER->on)
CONSOLE_MANAGER->on=false;
else
CONSOLE_MANAGER->on=true;
break;
case VK_ESCAPE:
PostQuitMessage(0);
break;
case 65: //A
CONSOLE_MANAGER->INPUT_MANAGER->KEYBOARD_InsertKey( ''A'', CONSOLE_MANAGER->Console_font, CONSOLE_MANAGER->SCREEN_MANAGER);
break;
case 66: //B
CONSOLE_MANAGER->INPUT_MANAGER->KEYBOARD_InsertKey(''B'', CONSOLE_MANAGER->Console_font, CONSOLE_MANAGER->SCREEN_MANAGER);
break;
.
.
.
case 57: //9
CONSOLE_MANAGER->INPUT_MANAGER->KEYBOARD_InsertKey(''9'', CONSOLE_MANAGER->Console_font, CONSOLE_MANAGER->SCREEN_MANAGER);
break;
}
break;
//MOUSE STUFF
case WM_MOUSEWHEEL:
{

}
break;
case WM_MOUSEMOVE:
{
mouseX = lParam&0xffff;//LOWORD(lParam);
mouseY = (lParam&0xffff0000)>>16;//HIWORD(lParam);
CONSOLE_MANAGER->MouseHover(mouseX, mouseY);
}
break;
case WM_LBUTTONUP:
{
int x = LOWORD(lParam);
int y = HIWORD(lParam);
CONSOLE_MANAGER->MouseInput(x, y);
}
break;
case WM_RBUTTONUP:
{
int x = LOWORD(lParam);
int y = HIWORD(lParam);
}
break;
default:
return DefWindowProc (hwnd, message, wParam, lParam);
}
return 0L;
}

and then compiled and got the error. I dont know if that can give you any insight. Once thing is, i compiled a VC++ example called MouseInfo that uses the WM_MOUSEWHEEL, and it worked fine. I cant figure it out. I also declared #define WIN32_LEAN_AND_MEAN, but i dont think that would matter. thanks for any help...


what we do in life... echoes in eternity...

Share this post


Link to post
Share on other sites
A good way of working out something like that is to right click on the include directory, choose search and use the "Containing text" field....

-----------------------------
-cow_in_the_well

''When in doubt, empty your magazine.'' - Murphy''s Combat Law

Share this post


Link to post
Share on other sites