- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I have a cvf project that I am trying to compile in IVF under Visual Studio 2005 standard edition. As far as I can tell the resource isn't being compiled as there is no .res file generated. When I run the program in debug or release mode it cacks when it tries to load the dialog. I am pretty green on resource files as they are hidden in Delphi, my usual environment.
The original project has a single dialog defined in a script1.rc file along with an icon defined in an icon1.ico file, which are listed as resource files in the project. I can load and view either of those from within VS. There is also a resource.h and resource.fd file.
The project builds properly in either debug or release mode, but fails to initialize the dialog (DLGINIT).
The relevant part of the io function is:
subroutine kim_tmi_io()
USE DFLOGM
INCLUDE 'RESOURCE.FD'
TYPE (dialog) dlg
external ok
external cancel
external browse_in,browse_out
real*4 decl,incl
LOGICAL retlog
character*256 file_in,file_out
character*10 c_incl,c_decl,c_depth,c_radius,c_susc,c_xo,c_yo,c_cor_min,c_width,c_field
common /etat/iok,icancel
common /file_name/file_in,file_out
common /param/incl,decl,depth,radius,susc,xo,yo,cor_min,grdsz,xmag,nn
data iok,icancel/0,0/
interface
integer(4) function InitializeOpen
end function
end interface
ifile_in_exist=0
retlog = DLGINIT (IDD_Dialog1, dlg)
IF (.not. retlog) THEN
WRITE (6,*) 'ERROR: dialog not found'
endif
Retlog always returns as FALSE. IDD_Dialog1 is defined in the Resource.FD file.
I've followed the instructions in the user and reference guide "Designing a Dialog Box Overview" and I'm seeing the include file being created during the build.
I've forced rc to compile the script1.rc file into script1.res, with no luck. I've copied it into the debug directory, same result.
I'm sure this is very simple, but I'm getting nowhere. Any hints?
cheers
Marc Pelletier
Goldak Airborne Surveys
I have a cvf project that I am trying to compile in IVF under Visual Studio 2005 standard edition. As far as I can tell the resource isn't being compiled as there is no .res file generated. When I run the program in debug or release mode it cacks when it tries to load the dialog. I am pretty green on resource files as they are hidden in Delphi, my usual environment.
The original project has a single dialog defined in a script1.rc file along with an icon defined in an icon1.ico file, which are listed as resource files in the project. I can load and view either of those from within VS. There is also a resource.h and resource.fd file.
The project builds properly in either debug or release mode, but fails to initialize the dialog (DLGINIT).
The relevant part of the io function is:
subroutine kim_tmi_io()
USE DFLOGM
INCLUDE 'RESOURCE.FD'
TYPE (dialog) dlg
external ok
external cancel
external browse_in,browse_out
real*4 decl,incl
LOGICAL retlog
character*256 file_in,file_out
character*10 c_incl,c_decl,c_depth,c_radius,c_susc,c_xo,c_yo,c_cor_min,c_width,c_field
common /etat/iok,icancel
common /file_name/file_in,file_out
common /param/incl,decl,depth,radius,susc,xo,yo,cor_min,grdsz,xmag,nn
data iok,icancel/0,0/
interface
integer(4) function InitializeOpen
end function
end interface
ifile_in_exist=0
retlog = DLGINIT (IDD_Dialog1, dlg)
IF (.not. retlog) THEN
WRITE (6,*) 'ERROR: dialog not found'
endif
Retlog always returns as FALSE. IDD_Dialog1 is defined in the Resource.FD file.
I've followed the instructions in the user and reference guide "Designing a Dialog Box Overview" and I'm seeing the include file being created during the build.
I've forced rc to compile the script1.rc file into script1.res, with no luck. I've copied it into the debug directory, same result.
I'm sure this is very simple, but I'm getting nowhere. Any hints?
cheers
Marc Pelletier
Goldak Airborne Surveys
Link Copied
4 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - marcp
Hello,
I have a cvf project that I am trying to compile in IVF under Visual Studio 2005 standard edition.
...
I've forced rc to compile the script1.rc file into script1.res, with no luck. I've copied it into the debug directory, same result.
I have a cvf project that I am trying to compile in IVF under Visual Studio 2005 standard edition.
...
I've forced rc to compile the script1.rc file into script1.res, with no luck. I've copied it into the debug directory, same result.
From your description, it seems that the resource compiler (rc.exe) is not invoked in the automated build process. It's not immediately obvious why, though.
- You said "VS2005 standard edition" -- can you please reconfirm it's not actually VS Premier Partner edition, which comes bundled with IVF? VS PPE does not have resource editor (but does have a resource compiler as far as I know).
- When you create and build a fresh dialog-based IVF application using the wizard, does it work?
- What does the Right-click/Properties/Command line for your .rc file say? Mine says '/d "_DEBUG" /l 0x0409 /fo "Debug/myapp.res"'
Tip: You can see what resources actually exist in any executable file. Just do File/Open your .exe or .dll file. VS2005 default is to "Open as resources" (in VS6, you must select "Open as"). It won't help you in this case, probably -- from your description, none will be there.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Is the problem that the build does not invoke rc.exe to compile the resource? In the past, one reason for this I have seen is an incorrect file association for .rc files. Try this (instructions for XP - might be different in Vista or Win7):
Open a Windows Explorer (directory) window.
Select Tools > Folder Options
Click on the FIle Types tab
Locate the extension RC. It should say something like:
Resource Template
Opens with Microsoft Developer Studio
If it doesn't (if it says Text File, for example), I suggest:
Delete the association
Do a "repair" of Visual Studio in Add/Remove Programs
Open a Windows Explorer (directory) window.
Select Tools > Folder Options
Click on the FIle Types tab
Locate the extension RC. It should say something like:
Resource Template
Opens with Microsoft Developer Studio
If it doesn't (if it says Text File, for example), I suggest:
Delete the association
Do a "repair" of Visual Studio in Add/Remove Programs
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - Jugoslav Dujic
From your description, it seems that the resource compiler (rc.exe) is not invoked in the automated build process. It's not immediately obvious why, though.
- You said "VS2005 standard edition" -- can you please reconfirm it's not actually VS Premier Partner edition, which comes bundled with IVF? VS PPE does not have resource editor (but does have a resource compiler as far as I know).
- When you create and build a fresh dialog-based IVF application using the wizard, does it work?
- What does the Right-click/Properties/Command line for your .rc file say? Mine says '/d "_DEBUG" /l 0x0409 /fo "Debug/myapp.res"'
Jugoslav,
Thanks for your response. My replies below.
1. It is indeed standard edition. It was purchased separately.
3. Under the project properties, resources, command line I see /d "_DEBUG" /l 0x0c0c /fo "Debug/kim_tmi.res", but under the rc file's properties there was nothing. I've fiddled with the command line there, entering rc /d "_DEBUG" /fo "Debug/kim_tmi.res" and the "Debug/kim_tmi.res" as outputs seems to work!
2. I'm not competent to create and use a dialog from scratch yet, but if I run the wizard and then create a dialog I still don't see anything in the rc custom build. Looks like I may have an installation problem.
I also found that the default association for .rc files was wrong and set it to visual studio.
Now I'm displaying the dialog and dying elsewhere.
Thanks for your help.
Marc
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - Steve Lionel (Intel)
Is the problem that the build does not invoke rc.exe to compile the resource? In the past, one reason for this I have seen is an incorrect file association for .rc files. Try this (instructions for XP - might be different in Vista or Win7):
Steve,
The file association was set to the Watcom editor, which I also installed (and apparently never removed) before settling on the Intel compiler. I've changed it now.
I have managed to get the dialog to display now as described in my other post. If only that were my only problem!
Thanks for your help.
Marc
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