本文介绍了获得键盘和鼠标输入的CWnd的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想创建一个获取键盘和鼠标输入的CWnd对象,但是我不想使用"EDIT"的WNDCLASS,因为这并不总是一个编辑.我希望它可以成为所有者抽奖.

I''d like to create a CWnd object that gets keyboard and mouse input, but I don''t want to use the WNDCLASS of "EDIT" because this won''t always be an edit. I want it to be owner draw.

// Something like this, but don''t want to use "EDIT"
CRect Pos(50,200,200,220);
MyWnd.Create(_T("EDIT"),_T("MyInputWnd),WS_CHILD | WS_VISIBLE, Pos, this,1);



AfxRegisterClass()似乎很复杂(我错了吗?),但这是唯一的方法吗?

有任何想法吗?更好的代码片段了吗?

在此先谢谢您.



AfxRegisterClass() seems pretty complicated (am I wrong?), but is this the only way to do this?

Any ideas? Better yet any code snippets?

Thanks in advance.

推荐答案


这篇关于获得键盘和鼠标输入的CWnd的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-09 18:20