Error in resource file

Started by Douglas McDonald, June 03, 2014, 11:31:55 AM

Previous topic - Next topic

Douglas McDonald

I'm using an image button with the window style set to icon and an icon added to .ico image library with format set to icon.
When I try to compile I get an error in the resource file that states the file format in the image library is incorrect can't create resource file.
I've tried using a bitmap also with the same results.

Any thoughts?

#include "resource.h"



VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,0,0,10
PRODUCTVERSION 1,0,0,0
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
FILEFLAGS 0x0
FILEOS VOS_WINDOWS32
FILETYPE VFT_APP
FILESUBTYPE VFT2_UNKNOWN
Begin
  BLOCK "StringFileInfo"
  Begin
    BLOCK "040904E4"
    Begin
      VALUE "CompanyName",  "Unicorp Systems Inc\0"
     
      VALUE "FileVersion",       "1.0.0.10\0"
      VALUE "ProductVersion",    "1.0.0.0\0"
      VALUE "ProductName",  "Work order scanning\0"
      VALUE "InternalName",  "WO_SCAN\0"
      VALUE "OriginalFilename",  "WO_SCAN.exe\0"
      VALUE "LegalCopyright",  "Unucorp Systems 2014\0"
     
      VALUE "Comments",  "by Doug McDonald\0"
    End
  End
  BLOCK "VarFileInfo"
    BEGIN
        VALUE "Translation", 0x409, 1252
    END
End


#define FIREFLY_RESOURCE   1

IMAGE_FOLDER03 BITMAP DISCARDABLE "..\\IMAGES\\FOLDER03.BMP"
IMAGE_FOLDER03 ICON DISCARDABLE "..\\IMAGES\\FOLDER03.ICO"

#define IDC_FRMMAIN_MNUFILES    6000
#define IDC_FRMMAIN_MNUOPENRUN    6001
#define IDC_FRMMAIN_MNUEDITCONFIG    6002
#define IDC_FRMMAIN_MNUEXIT    6003
#define IDC_FRMMAIN_MNUAUTORUN    6004
#define IDC_FRMMAIN_MNUSORTWO'S    6005

FRMMAIN_TOPMENU MENUEX DISCARDABLE
BEGIN
    POPUP "Files", IDC_FRMMAIN_MNUFILES, MFT_STRING
    BEGIN
        MENUITEM "Open & Run", IDC_FRMMAIN_MNUOPENRUN, MFT_STRING
        MENUITEM "Edit Config", IDC_FRMMAIN_MNUEDITCONFIG, MFT_STRING
        MENUITEM "Exit", IDC_FRMMAIN_MNUEXIT, MFT_STRING
    END
    MENUITEM "Auto Run", IDC_FRMMAIN_MNUAUTORUN, MFT_STRING, MF_GRAYED
    MENUITEM "Sort WO's", IDC_FRMMAIN_MNUSORTWO'S, MFT_STRING
END



// Manifest info for WinXP theme support
1 24 "CODEGEN_WO_SCAN.Exe.Manifest"
Doug McDonald
KD5NWK
www.redforksoftware.com
Is that 1's and 0's or 0's and 1's?

David Kenny

Did you try giving the two images a different name?

IMAGE_FOLDER03 BITMAP DISCARDABLE "..\\IMAGES\\FOLDER03.BMP"
IMAGE_FOLDER03 ICON DISCARDABLE "..\\IMAGES\\FOLDER03.ICO"

This looks like a possible problem.

David

Wilko Verweij

and the bitmaps/icons have to be present in the release folder...

Paul Squires

The problem is this line:

MENUITEM "Sort WO's", IDC_FRMMAIN_MNUSORTWO'S, MFT_STRING


Resource compiler hates the apostrophe.
Paul Squires
PlanetSquires Software

David Kenny

QuoteResource compiler hates the apostrophe.
But that shouldn't produce an error about the file format in the image library being incorrect... should it? 

What I was thinking is that FF is creating the name "IMAGE_FOLDER03" for two image resource items.  One a bitmap and one an icon.  Somewhere later on, something is trying to reference the bitmap and is finding an icon file format instead (or vise versa).

Oh well, one of the reasons I love FF is that it handles the resource stuff for me. :)  I hate dealing with it.