- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have several dialog boxes that I'm utilizing within an application as "pop-ups" to gatherer input from the user. The boxes were automatically created with OK and CANCEL buttons, which is fine because I use them. My problem is that I don't want any button on the dialog box to be activated by the ENTER key during data input. The OK button always becomes the default button even though I don't have it checked for default in the resource properties. How do I take the default status off of it?
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
What's wrong with using ENTER for OK button?
Well, if you insist, you could make an (invisible) default button yourself. Since DFLOGM automatically closes the dialog on unhandled buttons, you could workaround that behaviour by registering a callback for it:
Jugoslav
Well, if you insist, you could make an (invisible) default button yourself. Since DFLOGM automatically closes the dialog on unhandled buttons, you could workaround that behaviour by registering a callback for it:
SUBROUTINE OnMyButton(Dlg, ID, iEvent) !Either leave it empty, or... USE DFWIN, ONLY: SendMessage, WM_NEXTDLGCTL TYPE (Dialog):: Dlg INTEGER:: ID, iEvent, iSt !...include the following line to move focus to !the next control. iSt=SendMessage(Dlg%hWnd,WM_NEXTDLGCTL,0,0) END SUBROUTINE OnMyButtonHTH
Jugoslav

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page