PDA

Click to See Complete Forum and Search --> : Menu seperator


Kings
Nov 19th, 2002, 01:28 PM
How do I create a menu seperator (in a Win32 program). I've got the following code;

// Creates sub menu
hSubMenu = CreatePopupMenu();
AppendMenu(hSubMenu, MF_STRING, IDC_MENU_NEW, "&New");
AppendMenu(hSubMenu, MF_STRING, IDC_MENU_OPEN, "&Open");
AppendMenu(hSubMenu, MF_STRING, IDC_MENU_SAVE, "&Save");
AppendMenu(hSubMenu, MF_STRING, IDC_MENU_SAVEAS, "Save &As");
AppendMenu(hSubMenu, MF_STRING, IDC_MENU_SEP1, ""); //Like this to be a seperator
AppendMenu(hSubMenu, MF_STRING, IDC_MENU_EXIT, "E&xit");
AppendMenu(hMenu, MF_STRING | MF_POPUP, (UINT)hSubMenu, "&File");


Thanks

parksie
Nov 19th, 2002, 01:35 PM
I think you set the caption to "-".

crptcblade
Nov 19th, 2002, 01:41 PM
I remember something about an MF_SEPARATOR flag as well.

:)

Kings
Nov 19th, 2002, 02:04 PM
"-" didn't work (tried that first), but MF_SEPARATOR did:). So thanks, both of you. Especially because you replied so fast:D

Zaei
Nov 19th, 2002, 02:05 PM
Originally posted by parksie
I think you set the caption to "-".
Thats VB =P

Z.

parksie
Nov 19th, 2002, 02:15 PM
What? AAAAAAAARRRRRGGGHHHHHHHHHH!

/me smites VB for causing damage to my brain

Djikstra was right ;)

Zaei
Nov 19th, 2002, 02:20 PM
Originally posted by parksie
What? AAAAAAAARRRRRGGGHHHHHHHHHH!

/me smites VB for causing damage to my brain

Djikstra was right ;)
Yup!

Z.

crptcblade
Nov 19th, 2002, 02:27 PM
* pretends to understand *

Yup!

:)

CornedBee
Nov 20th, 2002, 04:42 AM
* admits he doesn't understand *

Who's Djikstra?

parksie
Nov 20th, 2002, 05:16 AM
Computer Science guy. Fairly famous ;)

Once said:It is practically impossible to teach good programming style to students that [sic] have had prior exposure to BASIC; as potential programmers they are mentally mutilated beyond hope of regeneration.

crptcblade
Nov 20th, 2002, 06:21 AM
Sounds like he's been reading my resume.

:)

Zaei
Nov 20th, 2002, 12:34 PM
Originally posted by parksie
Computer Science guy. Fairly famous ;)

Twas a sad day that he died =(

Z.

parksie
Nov 20th, 2002, 12:57 PM
True. At least we still have Knuth :)

I really need to order that book one of these days.

Zaei
Nov 20th, 2002, 04:02 PM
All three, you mean? ;)

I do too... now that I have some cash laying about, collecting dust... =). Or maybe I should wait, and save that for that laptop... :rolleyes: :D

Z.

parksie
Nov 20th, 2002, 04:03 PM
And the fourth once it's finished, yep.

I'm taking it as one book, 3 volumes :D

CornedBee
Nov 20th, 2002, 04:31 PM
Aahhh...

Very true indeed.

And I need to get the Effective C++, More Effective C++ and Effective STL books...

parksie
Nov 20th, 2002, 05:04 PM
Hmmm....volumes 1 and 2 from amazon are only £69.66 together, with no postage.....I am very tempted. Will check around first though ;)

Zaei
Nov 20th, 2002, 05:26 PM
They always have the three book set sitting out for $150 at B&N... always tempting... =)

Z.

parksie
Nov 20th, 2002, 05:29 PM
Arse. Will have to wait until I'm back from Uni and at home full-time....the couriers will need a signature -- everyone at home is at work during the day, and the people in the post room at Uni have a policy of not signing for things (annoying sometimes, but it's far safer that way).

Oh well. I've lasted waiting since 1983, I can wait 2 weeks more ;)