Resource Editor in Pelles C IDE cannot open the *.rc file it just has saved. To be correct - it's being opened as a plain text instead of being opened in Resource Editor.
Steps:
1. File -> New Project -> Pocket PC Application Wizard
2. Typing Project Name and path -> then press OK
3. App Name - any, Type of Pocket PC application - A "Hello, world" program.
4. Next -> needed files are being created -> Finish.
right here I copied *.rc file that has been created to different folder for examination purposes
5. Double Click at *.rc file in the Project Tree -> Resource Editor opens the file properly.
7. Save All button inside IDE becomes active.
8. Click Save All button
9. Close *.rc file (please note - no changes have been made)
10. Double Click at the same *.rc file again - now it opens as a plain text.
Now I've compared two files - actual *.rc file and the copy of it that I made recently after step 4 and below are the differences:
1. Saved copy (that is working) has at line 1:
//RESOURCE SCRIPT generated by "Pelles C for Windows, version 1.00".
Actual file has there:
// RESOURCE SCRIPT generated by "Pelles C for Windows, version 5.00".
2. All BEGIN and END statements have been replaced in the new file with brackets { and } accordingly.
3. #include <richedit.h> has been added to the new file.
4. This one:
IDR_MNU_MAIN RCDATA
BEGIN
IDR_MNU_MAIN, 1
(-2), IDM_ABOUT, 4, 24, IDS_ABOUT, 0, 0
ENDis replaced with this one:
IDR_MNU_MAIN SHMENUBAR
{
IDR_MNU_MAIN, 1
I_IMAGENONE, IDM_ABOUT, 0|TBSTATE_ENABLED, TBSTYLE_BUTTON|TBSTYLE_DROPDOWN|TBSTYLE_AUTOSIZE, IDS_ABOUT, 0, 0
}Modified:
Yesterday I found an error that Resource Editor reports. It cannot find symbol I_IMAGENONE that is present in the *.rc file mentioned above. This symbol is defined in <commctrl.h> at line 819, but its definition needs symbol UNDER_CE to be defined beforehand. Symbol UNDER_CE becomes defined in <windows.h> in case if _WINCE symbol is defined. As we can see in Project Settings, _WINCE is defined (!) and this is why the project can be still compiled and built without any errors.
I tried to define _WINCE directly in *.rc file, but this doesn't work, as well as if I define this in any other place...
BUT! If I put this:
#define _WINCEright in <windows.h> (that is in Include\WinCE folder) at Line 1 - everything begin to work!!!! Resource Editor is happy!
Compiler tells me that I've redefined _WINCE when I try to build the project, but this is not important
Well, dear Pelle, please find out why Resource Editor doesn't take _WINCE symbol definition into account if it's defined outside of <windows.h>