afxres.h and resource file issues
-
using evc++ 3.0 on win2k system and having the following issue. i'm building a simple ppc2k2 win32 api based app (no mfc or atl) and the ide isn't creating any files for me. i create an icon resource using "include->resource...", draw the icon, name the .rc file same name as my project file, save the .rc file in the same directory as my .cpp file, and then using "project->add to project->files" add the .rc and resource.h files to my project. first problem is afxres.h can't be found (doesn't exist on my system) and ide can't open up the resources..i remove the #include "afxres.h" from the .rc file. then trying to access the .rc file from the ide gives two errors (RC2144: PRIMARY LANGUAGE ID not a number, RC2135: file not found: 101) and fails to load resources again. finally i edit the .rc file and remove the following and the ide seems ok with the .rc file.
///////////////////////////////////////////
// English (U.S.) resources#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
#ifdef _WIN32
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
#pragma code_page(1252)
#endif //_WIN32i'd like to have the .rc files and editor work without requiring mods every time...what am i doing wrong and what's the purpose of afxres.h? thanks...
-
using evc++ 3.0 on win2k system and having the following issue. i'm building a simple ppc2k2 win32 api based app (no mfc or atl) and the ide isn't creating any files for me. i create an icon resource using "include->resource...", draw the icon, name the .rc file same name as my project file, save the .rc file in the same directory as my .cpp file, and then using "project->add to project->files" add the .rc and resource.h files to my project. first problem is afxres.h can't be found (doesn't exist on my system) and ide can't open up the resources..i remove the #include "afxres.h" from the .rc file. then trying to access the .rc file from the ide gives two errors (RC2144: PRIMARY LANGUAGE ID not a number, RC2135: file not found: 101) and fails to load resources again. finally i edit the .rc file and remove the following and the ide seems ok with the .rc file.
///////////////////////////////////////////
// English (U.S.) resources#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
#ifdef _WIN32
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
#pragma code_page(1252)
#endif //_WIN32i'd like to have the .rc files and editor work without requiring mods every time...what am i doing wrong and what's the purpose of afxres.h? thanks...
2. afxres.h This is an MFC supplied file which defines resource IDs for stuff like strings for use in menu hinting etc. You should be able to remove the reference to it from the "View/Resource Includes" option. I suspect that it (afxres.h)will be including other files which define LANG_ENGLISH. On my system here, that's WINNT.H, your system may be different. Once you've identified it, you could try using "View/Resource Includes" to specify that file should be included. That way you should not need to make any other changes manually. Steve S I am not an embedded/mobile expert
-
2. afxres.h This is an MFC supplied file which defines resource IDs for stuff like strings for use in menu hinting etc. You should be able to remove the reference to it from the "View/Resource Includes" option. I suspect that it (afxres.h)will be including other files which define LANG_ENGLISH. On my system here, that's WINNT.H, your system may be different. Once you've identified it, you could try using "View/Resource Includes" to specify that file should be included. That way you should not need to make any other changes manually. Steve S I am not an embedded/mobile expert
thanks Steve and it makes sense...i'll check out WINNT.H on my system for the #defines you mention. what's frustrating me is that i haven't found out why the resource compiler is even including afxres.h in the resource includes when i purposely create the project as a non-MFC project and don't utilize the wizard-created files. i'll check out what you suggest as well as continue to dig into the compiler/linker/other options in hope of finding this.