在面板的重载 WndProc 中没有收到 WM_KEYDOWN 消息?
我正在接收其他类型的消息,因此我知道正在调用重载方法。
我从搜索中找到的唯一信息是关于需要给予我的面板焦点以便它可以接收输入。然而,该解决方案没有任何帮助。 (http://www.dotnet247.com/247reference/msgs/44/221762.aspx)
任何帮助将不胜感激:)
I am receiving other types of messages, so I know the overloaded method is being called.
The only info I have found from searching talks about needing to give my Panel focus so that it can receive inputs. However, that solution did not help anything. (http://www.dotnet247.com/247reference/msgs/44/221762.aspx)
Any help would be appreciated :)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
所以问题与小组没有重点有关。
面板(和某些其他类型的控件)无法接收某些类型的输入,因为它无法接收适当的焦点。
我刚刚将类型从面板更改为按钮,一切正常。
这对我来说是可以接受的,因为无论如何我只使用这个控件作为刻度/渲染表面。
So the problem was related to the Panel not having focus.
A Panel (and some other types of controls) can not receive certain types of inputs because it can not receive proper focus.
I just changed the type from a Panel to a Button and things worked.
This was acceptable for me since I am only using this control as a tick/render surface anyways.