PreTranslateMessage中
if(pMsg->wParam == VK_RETURN) {
    /*...*/
    return TRUE;
}

解决方案 »

  1.   

    感谢您使用微软产品。只需自己写一个继承CPropertySheet的类,然后重载PreTranslateMessage即可。
    大致的代码如下:class CMyPropertySheet : public CPropertySheet
    {
    protected:
    afx_msg BOOL PreTranslateMessage(MSG* pMsg);
    DECLARE_MESSAGE_MAP()
    };BEGIN_MESSAGE_MAP(CMyPropertySheet, CPropertySheet)
    END_MESSAGE_MAP()
    BOOL CMyPropertySheet::PreTranslateMessage(MSG* pMsg) 
    {
    if (pMsg->message==WM_KEYDOWN && pMsg->wParam==13)
    {
    //Enter pressed in CPropertySheet ... 
    }
    return CPropertySheet::PreTranslateMessage(pMsg);
    }然后使用CMyPropertySheet替代原来的CPropertySheet。======================
    - 微软全球技术中心 微软全球技术中心 VC技术支持本贴子仅供CSDN的用户作为参考信息使用。其内容不具备任何法律保障。您需要考虑到并承担使用此信息可能带来的风险。具体事项可参见使用条款(http://support.microsoft.com/directory/worldwide/zh-cn/community/terms_chs.asp)。
    为了为您创建更好的讨论环境,请参加我们的用户满意度调查(http://support.microsoft.com/directory/worldwide/zh-cn/community/survey.asp?key=(S,49854782))。
    ======================