I want to use the Mouse Wheel for zoom a picture in and out!!
I want to get the WM whit this:
int postHandle;
//Win M
Ret = InstallWinMsgCallback (moinPanel, WM_MOUSEWHEEL, cbMouseWheel,
VAL_MODE_IN_QUEUE, NULL, &postHandle);
strcpy(ErrorM, GetGeneralErrorString (Ret));
//THE CALLBACK
int CVICALLBACK cbMouseWheel (int panelHandle, int message,
unsigned int* wParam,
unsigned int* lParam,
void* callbackData)
{
zDelta = GET_WHEEL_DELTA_WPARAM(wParam);
if(zDelta==+120)
{
ZoomIn();
}
if(zDelta==-120)
{
ZoomOot();
return 0;
}
I have included the winuser.h!
And now when I run the programm theres an error message:
Undeclared identifier 'WM_MOUSEWHEEL'.
I think it becaus this here in the winuser.h:
#if (_WIN32_WINNT >= 0x0400) || (_WIN32_WINDOWS > 0x0400)
#define WM_MOUSEWHEEL 0x020A
#endif
I use win XP!
I try the same thing with the WM_MBUTTONDOWN and It works!!
Can someone help me with this problem!