关于WM_MOUSEWHEEL的问题 [英] Question about WM_MOUSEWHEEL

查看:164
本文介绍了关于WM_MOUSEWHEEL的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个类,其父级是 CWND

i为写了一个函数WindowProc 在其中,我有一个if语句的消息参数。

该函数适用于 WM_MOUSEMOVE WM_LBUTTONDOWN 和...我可以收到消息并执行我的操作,但我有 WM_MOUSEWHEEL 的问题。

那里没有为此消息生成消息,所以我不能写我的轮功能。



i应该添加这个词,当我使用应用程序时,我没有问题并且 WM_MOUSEWHEEL 正常工作,但在我的用法中,该类位于ActiveX控件中,它应该是此控件的窗口。



谢谢

i have a class that its parent is CWND.
i wrote a function for WindowProc that in it, i have an if statement for message parameter.
the function works for WM_MOUSEMOVE, WM_LBUTTONDOWN and ... and i can get the message and do my action, but i have problem with WM_MOUSEWHEEL.
there is no message generated for this message and so i cant write my function for wheel.

i should add this words that, when i work with an Application, i have no problem and the WM_MOUSEWHEEL works properly, but in my usage, the class is in the ActiveX Control and it should be a window for this control.

thanks

推荐答案

好吧,根据你的问题,我无法正确地知道你想要什么。所以我搜索了一些关于WM_MOUSEWHELL的内容。请参阅此处的文章。



http:// msdn.microsoft.com/en-us/library/aa923539.aspx [ ^ ]

http:// www。 cplusplus.com/forum/windows/33960/ [ ^ ]



如果您的使用正确且任何其他问题都可以删除您的WM_MOUSEWHELL,请使用Visual Studio上安装的SPY ++。您可以在工具栏上找到带有日志消息的窗口,并仅检查鼠标事件。您可以激活窗口并执行鼠标滚轮处理。当你可以检测到WM_MOUSEWHEEL事件发生的地方......



我希望这会对你有所帮助。
Well, According to your questions, I can't properly know what you want. So I've searched something about WM_MOUSEWHELL. See articles here.

http://msdn.microsoft.com/en-us/library/aa923539.aspx[^]
http://www.cplusplus.com/forum/windows/33960/[^]

If your usage is right and any other problem can remove your WM_MOUSEWHELL, use SPY++ installed on Visual Studio. You can find your window with "Log Messages" on toolbar and check only Mouse events. And you can active your window and do your mouse wheel process. When you can detect WM_MOUSEWHEEL event goes where...

I hope this will be of help to you.


#include <stdio.h>
#include<string.h>

char f[10000];
char factorial[1010][10000];

void multiply(int k)
{
int cin,sum,i;
int len = strlen(f);
cin=0;
i=0;
while(i<len)
{
sum=cin+(f[i] - '0') * k;
f[i] = (sum % 10) + '0';
i++;
cin = sum/10;
}
while(cin>0)
{
f[i++] = (cin%10) + '0';
cin/=10;
}
f[i]='\0';
for(int j=0;j<i;j++)
factorial[k][j]=f[j];

factorial[k][i]='\0';
}
void fac()
{
int k;
strcpy(f,"1");
for(k=2;k<=1000;k++)
multiply(k);
}
void print(int n)
{
int i;
int len = strlen(factorial[n]);
printf("%d!\n",n);
for(i=len-1;i>=0;i--)
printf("%c",factorial[n][i]);
printf("\n");
}
int main()
{
int n;
factorial[0][0]='1';
factorial[1][0]='1';
fac();
while(scanf("%d",&n)==1){
print(n);
}
return 0;
}


这篇关于关于WM_MOUSEWHEEL的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆