Catch WM_KEYDOWN even when modal dialog is open

Philipp Kursawe <[email protected]> Fri, 15 Apr 2011 12:44:30 +0200
Newsgroups gmane.comp.windows.wtl
Message-ID <[email protected]>
Hello,

I have this PreTranslateMessage:

bool preTranslateMessage(MSG& msg) {
    if (msg.message == WM_KEYDOWN && !lockWindow) {
      if (keyBuffer.check(msg.wParam)) {
        onDeviceIdle();
        return true;
      }
    }
    return BaseFrame::PreTranslateMessage(&msg) ||
BaseFrame::IsDialogMessage(&msg) || sheet.PreTranslateMessage(&msg);
  }


Now, when a modal dialog is open, it has its own message loop and my
message loop is bypassed. How could I catch WM_KEYDOWN messages anyway
without modifying the dialogs message loop?


Thanks,
Phil


------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/wtl/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/wtl/join
    (Yahoo! ID required)

<*> To change settings via email:
    [email protected] 
    [email protected]

<*> To unsubscribe from this group, send an email to:
    [email protected]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/