Software Archive
Read-only legacy content

Dialogbox

Intel_C_Intel
Employee
397 Views
I just tried to build the simplest dialog box following the example from users' guide. But I got an error message:
Compiling resources...
C:FORTRANFILEDLGBOXDIALGBOX.RC(10) : fatal error RC1015: cannot open include file 'afxres.h'.
Error executing rc.exe.
Can anyone tell me what was wrong? My code are

program dgbox
use dfwin
!dec$objcomment lib:"user32.lib"
use dflogm
implicit none
include 'resource.fd'
type (dialog) dlg
integer retint
logical retlog
character*80 text
retlog = DlgInit( idd_dgbox, dlg )
if ( .not. retlog) then
write (*,*) "error: resource not found"
else
retint = DlgModal( dlg )
endif
end program
0 Kudos
3 Replies
Steven_L_Intel1
Employee
397 Views
What version of Visual Fortran are you using? You entered "5.2" (only moderators can see that), but there is no such version.

afxres.h should be in Microsoft Visual StudioVC98Include and that path should be listed under Tools..Options..Directories..Include files. Try doing a Per-User Setup (from Visual Fortran program group) and see if that helps - if not, manually add the above path (including appropriate device) to the list of include directories.

Steve
0 Kudos
Intel_C_Intel
Employee
397 Views
Thanks, Steve. I fixed it.
BTW, do you know how to pass a string (file name with path) from VB to a fortran executalbe file? I know it can be done by DLL, but can it also be done through an exe file ?
0 Kudos
Steven_L_Intel1
Employee
397 Views
I'll answer in your other topic.

Steve
0 Kudos
Reply