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

Dialogs

kgcole
Beginner
604 Views
Hello, I'm new around this forum, and recently downloaded an evaluation version of Visual Studio. I've been trying to make my own Dialog process with a Fortran source, and haven't been successful. I've used DLGINIT, and DLGMODAL to display my created dialog, but the dialog doesn't show. I've got the proper resource.h and resource.fd files generated, but still doesn't show. If I included the short source code here, would someone be able to tell me what I'm missing that is causing the problem? - - Kevin
0 Kudos
4 Replies
ZlamalJakub
New Contributor III
604 Views

Please post your project (all significant files *.vfproj, resources, source code)

Jakub

0 Kudos
kgcole
Beginner
604 Views

Thanks Jakub...it's very simple as I'm a novice...my source file (Source1.f90):

PROGRAM PLAYRUS

implicit none

INTEGER lret

IF(lret) THEN

CALL ENVIRON

END IF

END

SUBROUTINE ENVIRON

!DEC$ IF DEFINED(_X86_)

!DEC$ ATTRIBUTES STDCALL, ALIAS : '_ENVIRON@16' :: ENVIRON

!DEC$ ELSE

!DEC$ ATTRIBUTES STDCALL, ALIAS : 'ENVIRON' :: ENVIRON

!DEC$ ENDIF

use user32

use kernel32

use iflogm

use ifwinty

implicit none

integer(SINT) nCmdShow

integer(BOOL) bret

include 'resource.fd'

type (dialog) gdlg

type (T_MSG) mesg

LOGICAL lret

lret = DLGINIT(DrillCmd, gdlg)

lret = DlgModeless(gdlg, nCmdShow)

PAUSE

END SUBROUTINE ENVIRON

....my resource.h:

//{{NO_DEPENDENCIES}}

// Microsoft Visual C++ generated include file.

// Used by Resource1.rc

//

#define IDD_DIALOG1 101

#define DrillCmd 101

// Next default values for new objects

//

#ifdef APSTUDIO_INVOKED

#ifndef APSTUDIO_READONLY_SYMBOLS

#define _APS_NEXT_RESOURCE_VALUE 102

#define _APS_NEXT_COMMAND_VALUE 40001

#define _APS_NEXT_CONTROL_VALUE 1000

#define _APS_NEXT_SYMED_VALUE 101

#endif

#endif

...my resource.fd

!

! resource.fd generated from resource.h

!

integer, parameter :: IDD_DIALOG1 = 101

integer, parameter :: $_WIN32 = 1

integer, parameter :: DrillCmd = 101

0 Kudos
ZlamalJakub
New Contributor III
604 Views

I do not know how you created your resource files but there are only definitions of constants not dialog itself (resource.rc).

I do not use intel build in dialog routines and did not found any example in samples of intel fortran, but you can try to look to samples (in directory)

"c:\Program Files (x86)\Intel\Compiler\11.1\060\Samples\en_US\Fortran\Dialog.zip"

I have found some example in old CVF compiler and prepared project to you, look at it and learn how to do.

Jakub

0 Kudos
kgcole
Beginner
604 Views

Thanks, Jakub, I'll look the samples over..... - - Kevin

0 Kudos
Reply