|
-
April 28th, 1999, 04:10 AM
#1
Modeless Dialog Message handling
I have a DLL with a modeless dialog. But when pressing the TAB key focus does not rotate around the dialog's controls. I have tried trapping for keyboard events in WM_KEYDOWN and PreTranslateMessage. But there is no event. What is happening?
-
April 28th, 1999, 12:35 PM
#2
Re: Modeless Dialog Message handling
Are you using the Windows API to implement the modeless dialog or MFC? If it's Windows API, you have to call IsDialogMessage(hwndDialog) in the parent's message queue processing to make sure that the dialog gets its messages.
Regards,
Paul McKenzie
-
April 29th, 1999, 03:36 AM
#3
Re: Modeless Dialog Message handling
Hi Paul, thanks for the tip.
I tried using this function as suggested in the calling app, but it doesnt ever return TRUE. What i have found in PreTranslateMessage on the parent App. is that when tab is pressed on the DLLs modeless dlgs, a message for that control appears.
Any suggestions as the best way to get this message passed on to the dialog in the DLL?
Any help greatly appreciated, Stew
-
May 25th, 1999, 11:03 AM
#4
Re: Modeless Dialog Message handling
I have the same problem, and i use only MFC commands to build the dialog (Create, ShowWindow of CWnd)... Any response welcome...
-
June 1st, 1999, 09:54 AM
#5
Re: Modeless Dialog Message handling
See in msdn, you must subclass the message handler of your app (in MFC, subclass the PreTranslateMessage), and call an user function of your dll (for example TranslateMessage). This function must call the PreTranslateMessage of the dll's CWinApp, like: AfxGetWinApp ()->PreTranslateMessage (pmsg).
I try this, it's O.K. but what is the process in a VB app or a Delphi app?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|