Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.

Dialog Buttons (Default)

lwgiese
Beginner
812 Views
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?
0 Kudos
1 Reply
Jugoslav_Dujic
Valued Contributor II
812 Views
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:
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 OnMyButton
HTH
Jugoslav
0 Kudos
Reply