屏蔽ENTER键和ESC键的使用
BOOL CBingLi::PreTranslateMessage(MSG* pMsg) { // TODO: Add your specialized code here and/or call the base class if(pMsg->message ==WM_KEYDOWN) { int nVirtKey = (int)pMsg->wParam; if (nVirtKey==VK_ESCAPE || nVirtKey == VK_RETURN) return TRUE; } return CDialog::PreTranslateMessage(pMsg); }
Resource栏load failed:this file is already open in the editor 碰到这情况是由于.rc文件在右栏中已打开的原因: 你关闭它就可以了,具体步骤如下:
1、点击左栏的"Resource View"标签,这时。弹出一个”load failed “对话框,关掉它。
2、这时可看出右栏中显示的正在打开的文件是 .rc文件(看VC++窗口的标题栏可知)。
3、将右栏中的文件关闭,方法是按下右上角的“关闭”按纽,
4、然后第二次点击左栏的"Resource View"标签,这时弹出对话框