Win32的窗口
编辑了menu.rc脚本
//menu.rc
#include "menu.h"
MyMenu MENU
{
POPUP "&File"
{
MENUITEM "&New" , IDM_NEW
MENUITEM "&Open", IDM_OPEN
MENUITEM "&Save", IDM_SAVE
}
MENUITEM "&Edit",IDM_EDIT
POPUP "&View"
{
MENUITEM "S&tatus",IDM_STAT
}
}
-----
menu.h的内容:
//menu.h
#define IDM_NEW 99
#define IDM_OPEN 100
#define IDM_SAVE 101
#define IDM_EDIT 102
#define IDM_STAT 103
-----
将上面两个文件加入到工程后编译提示错误:
F:\VCProject\miniWindow\menu.h(6) : fatal error RC1004: unexpected end of file found
Error executing rc.exe.
-----
但是如果把头文件的预定义加到rc里就可以编译通过
#define IDM_NEW 99
#define IDM_OPEN 100
#define IDM_SAVE 101
#define IDM_EDIT 102
#define IDM_STAT 103
MyMenu MENU
{
POPUP "&File"
{
MENUITEM "&New" , IDM_NEW
MENUITEM "&Open", IDM_OPEN
MENUITEM "&Save", IDM_SAVE
}
MENUITEM "&Edit",IDM_EDIT
POPUP "&View"
{
MENUITEM "S&tatus",IDM_STAT
}
}
-------
请问这是为什么?