Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

Custom Dialogs and HELP


1 reply to this topic

DJoyner

DJoyner
  • Members
  • 4 posts

Posted 25 June 2002 - 16:12

I have created some custom dialogs which work fine with the exception that they don't detect F1 (HELP) or ESC for that matter. Putting a trap in the 'default' of the loop to message out any messages not handled proves that the F1 message does not come into the 'WaitOnDialog' loop.

Then I found that not handling one of the controls in the loop(commenting out a pushbutton for example) causes the loop to 'wake up' when that pushbutton is hit when the loop is entered. After that the F1 (and ESC) work fine.

All standard dialogs handle the F1 key fine.

I have created the dialogs using Visual Studio.

DJoyner

DJoyner
  • Members
  • 4 posts

Posted 27 June 2002 - 10:13

I have found an answer so I'll update just in case in may be of use to others.

Although it would appear that the custom dialog has the Windows focus, it hadn't in the full context. Hitting a pushbutton would first give focus and immediately perform. I simply added the following line of code at the end of "case DLG_INIT:"

SetFocus(hwndDlg);

(assuming that you already have the handle with something like

hwndDlg = CmdGetHwndDlg (szMSDEDlg);

)