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

Problem of initiate a dialog.

yaodong
Beginner
438 Views
I am going to initiate a dialog in a fortran windows program.
The dialog I want can be displayed on the discreen. But when I push the default bottoms (OK and Cancel) on it, the dialog can not disppear nomally, there comes a mistake. I don't know why.

Following is part of my routines:

lret = DlgInit(IDD_List, dlg)
ret = DlgModal( Dlg )
call DlgUninit(dlg)

BTW, this is not a main dialog, but a bottom absed one, which means that when I push the bottom on the main dialog, this dialog will appear.

Thank you.
0 Kudos
2 Replies
Jugoslav_Dujic
Valued Contributor II
438 Views
I may be wrong, but it sounds as if you're reusing the same Dlg variable for "parent" and "child" dialog, e.g.:
subroutine OnButtonClick(Dlg,id,iEvent)
use dflogm
type(Dialog):: dlg
integer:: id,iEvent

lret = DlgInit(IDD_List, dlg)
ret = DlgModal( Dlg )
call DlgUninit(dlg)

You must use different variables, i.e. declare another type(Dialog):: Dlg2 and use that.

Jugoslav
0 Kudos
yaodong
Beginner
438 Views
Jugoslav,
You are right.
Thank you, very much.
0 Kudos
Reply