Feb 4, 2013 at 11:23am UTC
I'm trying to go through the windows library to try and learn as much as I can until I can get my hands on a petzold's book.
I'm stuck on the example on this site (
where they are trying to show how to draw shapes to the screen. I just don't understand where to put this code snippet;
2 3 4 5 6
MENUITEM "&Ellipse", IDM_ELLIPSE
MENUITEM "&Rectangle", IDM_RECTANGLE
MENUITEM "R&oundRect", IDM_ROUNDRECT
Their instructions are;
To enable the user to draw filled shapes, include the following popup menu in your application.
I've tried putting it in my winmain in various places, I've tried placing it in global scope, I've even tried making it an .rc file, but they're all no-goes.
Can someone tell me where it goes or how to implement it?
So you know, I'm very new to windows programming and am trying to learn it from a tutorial that is trying to teach it using C# which is kind of confusing at times.
Last edited on
Feb 4, 2013 at 11:55am UTC
Feb 4, 2013 at 12:26pm UTC
As you found out, that is a part of a menu description.
So the first question is:
1. Does your project have an .rc file already which has a menu descrition already in it?
Feb 4, 2013 at 9:54pm UTC
You know, that's the hint that I needed. I made an .rc file that only contained the code above, but I guess there is more to it. I do have a tutorial that goes over menu creation using rc files so I'll be reading that today. (I gave up on the rc file aproach before because I wasn't sure if rc files were C# or C++ code, apparently they work with both?)