Re: Re: Catch WM_KEYDOWN even when modal dialog is open
Philipp Kursawe <[email protected]> Sat, 16 Apr 2011 08:27:44 +0200
| Newsgroups | gmane.comp.windows.wtl |
|---|---|
| Message-ID | <[email protected]> |
Thanks for your answer! I cannot use the WTL idle processing. The code you see "locks" the Windows CE device when you press a certain key sequence. onDeviceIdle then displays a lock icon. On Sat, Apr 16, 2011 at 1:46 AM, domehead100 <[email protected]> wrote: > You'd have to use a windows hook (either a keyboard hook or a message hook) > if the dialog is modal. > > If the dialog can be nonmodal (it could disable it's owner or the owner's > top-level parent to simulate being modal), of course you could still use > PreTranslateMessage. > > Glancing at your code, from what you're trying to do I'm wondering why not > just use WTL's built-in idle processing in the main GUI thread? > > ~Mike > > > --- In [email protected], Philipp Kursawe <phil.kursawe@...> wrote: > > > > 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 > > > > [Non-text portions of this message have been removed] ------------------------------------ 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/