- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I will appreciate help with the following.
I am using CVF Standard edition 6.1A on Windows 98. The following is a simplified version of a program I am writing. The subroutine testch opens a child window and displays the message "press enter to continue". The child window opens and closes without problems both times when called from withing the program Main. However, when the subroutine testch is called from within the callback routine Menu2, the program hangs and does not respond to any input while the child window remains behind the dialog box from where it was called.
Is it possible to display a child window from a call back routine? What am I missing in my program?
Oscar H.
program Main
use dflogm
implicit none
include 'resource.fd'
type (dialog) dlg
logical lret
external Menu1, Menu2
call testch
close( unit=11, status = 'delete' )
lret = DlgInit( IDD_DIALOG1, dlg )
lret = DlgSetSub( dlg, IDC_BUTTON1, Menu1 )
lret = DlgSetSub( dlg, IDC_BUTTON2, Menu2 )
lret = DlgModal( dlg )
call testch
close( unit=11, status = 'delete' )
end program Main
subroutine Menu1( dlg, id, callbacktype )
use dflogm
implicit none
type (dialog) dlg
integer id, callbacktype
include 'resource.fd'
logical lret
lret = DlgSet( dlg, IDC_OPTION, 'Menu1 Selected' )
end subroutine Menu1
subroutine Menu2( dlg, id, callbacktype )
use dflogm
implicit none
type (dialog) dlg
integer id, callbacktype
include 'resource.fd'
logical lret
lret = DlgSet( dlg, IDC_OPTION, 'Menu2 Selected' )
!!!!The programs hangs at the next statement: !!!!
call testch
close( unit=11, status = 'delete' )
end subroutine Menu2
subroutine testch
use dflib
open (11,file="user")
write(11,*) "Press Enter to continue"
read (11,*)
end subroutine testch
I am using CVF Standard edition 6.1A on Windows 98. The following is a simplified version of a program I am writing. The subroutine testch opens a child window and displays the message "press enter to continue". The child window opens and closes without problems both times when called from withing the program Main. However, when the subroutine testch is called from within the callback routine Menu2, the program hangs and does not respond to any input while the child window remains behind the dialog box from where it was called.
Is it possible to display a child window from a call back routine? What am I missing in my program?
Oscar H.
program Main
use dflogm
implicit none
include 'resource.fd'
type (dialog) dlg
logical lret
external Menu1, Menu2
call testch
close( unit=11, status = 'delete' )
lret = DlgInit( IDD_DIALOG1, dlg )
lret = DlgSetSub( dlg, IDC_BUTTON1, Menu1 )
lret = DlgSetSub( dlg, IDC_BUTTON2, Menu2 )
lret = DlgModal( dlg )
call testch
close( unit=11, status = 'delete' )
end program Main
subroutine Menu1( dlg, id, callbacktype )
use dflogm
implicit none
type (dialog) dlg
integer id, callbacktype
include 'resource.fd'
logical lret
lret = DlgSet( dlg, IDC_OPTION, 'Menu1 Selected' )
end subroutine Menu1
subroutine Menu2( dlg, id, callbacktype )
use dflogm
implicit none
type (dialog) dlg
integer id, callbacktype
include 'resource.fd'
logical lret
lret = DlgSet( dlg, IDC_OPTION, 'Menu2 Selected' )
!!!!The programs hangs at the next statement: !!!!
call testch
close( unit=11, status = 'delete' )
end subroutine Menu2
subroutine testch
use dflib
open (11,file="user")
write(11,*) "Press Enter to continue"
read (11,*)
end subroutine testch
Link Copied
0 Replies

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