#include "stdafx.h" #include "DlgPane.h" #include "afxdialogex.h" IMPLEMENT_DYNAMIC(CDlgPane, CDialogEx) CDlgPane::CDlgPane(CWnd* pParent /*=NULL*/) : CDialogEx(GetIDD(), pParent) { } CDlgPane::~CDlgPane() { } //截获一部分键盘输入传递给view BOOL CDlgPane::PreTranslateMessage(MSG* pMsg) { if(pMsg->message==WM_KEYDOWN) { char c = pMsg->wParam; if(c==VK_RETURN || c==VK_ESCAPE) { return TRUE; } } return CDialogEx::PreTranslateMessage(pMsg); }