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"
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
and the bitmaps/icons have to be present in the release folder...
The problem is this line:
MENUITEM "Sort WO's", IDC_FRMMAIN_MNUSORTWO'S, MFT_STRING
Resource compiler hates the apostrophe.
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.