Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

Menu in a dialog

glimmerman24
Beginner
765 Views
I was wondering if there was a way to use a menu in a dialog box. Havetried everything so just looking for some help. Also when doing a windows app. can you display a dialog box as the main window?
thanks
0 Kudos
2 Replies
Jugoslav_Dujic
Valued Contributor II
765 Views
See MenuDialog sample. Actually, that's even simpler if you don't use DFLOGM but straightforward API calls (DialogBox->DialogProc->WM_COMMAND), as there is no need for subclassing.
The dialog box can be main window. Actually, that's the simplest form of Windows application:
Code:
integer function WinMain(hInst, ...)
!DEC$ATTRIBUTES...
use dflogm
include "resource.fd"
...
b = DlgInit(IDD_WHATEVER, Dlg)
b = DlgSet(...)
iret = DlgModal(Dlg)

call DlgUnInit(Dlg)

WinMain = 0

end function WinMain
(CVF Application Wizard will generate a more complicated variant of the same -- I suggest keeping it simple as above).
Jugoslav
0 Kudos
glimmerman24
Beginner
765 Views
Thanks for the great help it helped me get out of one problem but i have since ran into another problem. After updating the main dialog box i can not get a the updated information into a data structure because i have no way of knowing when the actual list box has been changed because it is done in a callback routine and you can not pass a data structure to the call back routine. If you could help me by telling me a way to get around getting other information into a call back routine that would be of great help
Thanks
0 Kudos
Reply