标题:加菜单时的错误
只看楼主
wonglaye
Rank: 1
等 级:新手上路
帖 子:27
专家分:0
注 册:2006-3-26
 问题点数:0 回复次数:0 
加菜单时的错误

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
}
}

-------
请问这是为什么?

搜索更多相关主题的帖子: 菜单 
2006-04-04 15:12



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-55018-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.058310 second(s), 8 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved