问题1:在dialog里放置一个edit.如果不想dialog也收到edit里的wm_keydown!该怎么做?
问题2:用vc做了一个activex控件.放置在ie里.activex带有一个edit.这是在edit里按back键没有反应.并不删除前一个字符.
我觉得是back键的消息被ie窗口捕捉了。本人想的解决方法是edit的wm_keydown消息.不发送给父窗口.该怎么做??/请高手赐教。多谢。。:)

解决方案 »

  1.   

    重载虚函数:BOOL CMyEdit::PreTranslateMessage(MSG* pMsg) 
    {
    // TODO: Add your specialized code here and/or call the base class
    if( pMsg->hwnd == m_hWnd && pMsg==WM_KEYDOWN ) {
    // do something
    return true;
    }return CEdit::PreTranslateMessage(pMsg);
    }================================================================
    长恨此身非我有/何时忘却营营/夜阑风静觳纹平/小舟从此逝/江海寄余生
    ================================================================
      

  2.   

    BOOL CMyEdit::PreTranslateMessage(MSG* pMsg) 
    {
    // TODO: Add your specialized code here and/or call the base class
    if( pMsg->hwnd == m_hWnd && pMsg->message==WM_KEYDOWN ) {
    // do something
    return true;
    }return CEdit::PreTranslateMessage(pMsg);
    }================================================================
    长恨此身非我有/何时忘却营营/夜阑风静觳纹平/小舟从此逝/江海寄余生
    ================================================================