PDA

Click to See Complete Forum and Search --> : Menus (API)


SteveCRM
Mar 4th, 2001, 03:59 PM
How do I make'm? :confused:

parksie
Mar 4th, 2001, 04:05 PM
You need to make a menu in the resource editor...here's a sample project...
I'll try and find some decent info in a moment.

SteveCRM
Mar 4th, 2001, 04:14 PM
So here's what I see.

You make the menu with a resource file. You Add it to the CPP File with quotes. You just put it in the switch to see what's pushed. Is that correct?

parksie
Mar 4th, 2001, 04:35 PM
Almost. The .rc file is compiled separately from the .cpp file, to make a .res file. The file resource.h contains the definitions of the numerical items in the resource file, and is included into the .cpp file.

The linker combines the .res file along with the rest when it makes the final .exe.

SteveCRM
Mar 4th, 2001, 04:43 PM
LIBCD.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
Debug/Random Practices.exe : fatal error LNK1120: 1 unresolved externals


What do these two errors mean? These are what I get when I try to run the program.

parksie
Mar 4th, 2001, 04:48 PM
You need to make sure that your project type is "Win32 Application" not "Win32 Console Application" and all the files have been added to the project.

SteveCRM
Mar 4th, 2001, 06:26 PM
for some reason I can't make a resource file anymore....I can design it but it won't show up in the list.

SteveCRM
Mar 4th, 2001, 06:28 PM
the menu doesn't show up :confused:

SteveCRM
Mar 4th, 2001, 09:48 PM
Never mind I got it :D

CyberCarsten
Mar 5th, 2001, 06:12 AM
How did you do it???? :D
I don't know if you have seen my post Menus again...
I was also trying to add a menu to my C++ program, but it just wouldn't show up!! How did you do it???

parksie
Mar 5th, 2001, 06:45 AM
I used exactly the same method as you did in yours...and it works in VC++ :confused:

This is really weird...I have no idea :rolleyes:

CyberCarsten
Mar 5th, 2001, 07:05 AM
Hi parksie! I don't know if you have seen my reply, in Menus again.....take a look!! :D

SteveCRM
Mar 5th, 2001, 09:54 AM
did you try this? This pissed me off for a few minutes...iit won't show up without this...

SetMenu(ghWnd_Main, LoadMenu(hInstance, MAKEINTRESOURCE(IDR_MENU1)));

CyberCarsten
Mar 5th, 2001, 10:38 AM
Hi Steve!
I found the problem....I forgot to include the .rc file into the compiler....doooh!!! :D

SteveCRM
Mar 5th, 2001, 11:06 AM
yeah I read your thread right after I replied...congratulations :D

CyberCarsten
Mar 5th, 2001, 11:12 AM
Thank you! :p