Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Creating a class-based menu in C++

SephirothSephiroth Fayetteville, NC, USAMember Posts: 1,035
Alright, I have created the resource-file for a window in my application but it is causing me a strange problem. The application compiles correctly if I remove the resource file from the project, but when I add it to the project the compiler claims that a totally seperate file has a problem, which it does not. I am going to post the resource-file source here. I have checked at the MSDN and even the MSDN examples are identical to this, so I am kind of lost.
[code]
#include "Main.h"

IDR_EDITORMENU MENU
BEGIN
POPUP "&File"
BEGIN
MENUITEM "&New", IDM_FILE_NEW
MENUITEM "&Save", IDM_FILE_SAVE
MENUITEM "Save &As...", IDM_FILE_SAVEAS
MENUITEM SEPARATOR
MENUITEM "E&xit", IDM_FILE_EXIT
END
END
[/code]
Those defines are defined in the 'Main.h' header, so I know that's not a problem. It seems that adding this code breaks the entire project though, so it must be in here somewhere.

*EDIT*

Found the problem, it was a bug in VS2005 that requires every file to have a blank line at the end of it, and one of my headers didn't. That was fine until the resource file came into play. Added a single blank line and all was good.

-[italic][b][red]S[/red][purple]e[/purple][blue]p[/blue][green]h[/green][red]i[/red][purple]r[/purple][blue]o[/blue][green]t[/green][red]h[/red][/b][/italic]
Sign In or Register to comment.