Results 1 to 19 of 19

Thread: Menu seperator

  1. #1

    Thread Starter
    Fanatic Member Kings's Avatar
    Join Date
    Aug 2001
    Posts
    673

    Menu seperator

    How do I create a menu seperator (in a Win32 program). I've got the following code;
    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

  2. #2
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    I think you set the caption to "-".
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  3. #3
    The Devil crptcblade's Avatar
    Join Date
    Aug 2000
    Location
    Quetzalshacatenango
    Posts
    9,091
    I remember something about an MF_SEPARATOR flag as well.

    Laugh, and the world laughs with you. Cry, and you just water down your vodka.


    Take credit, not responsibility

  4. #4

    Thread Starter
    Fanatic Member Kings's Avatar
    Join Date
    Aug 2001
    Posts
    673
    "-" didn't work (tried that first), but MF_SEPARATOR did. So thanks, both of you. Especially because you replied so fast
    K i n g s

  5. #5
    Frenzied Member Zaei's Avatar
    Join Date
    Jul 2002
    Location
    My own little world...
    Posts
    1,710
    Originally posted by parksie
    I think you set the caption to "-".
    Thats VB =P

    Z.

  6. #6
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    What? AAAAAAAARRRRRGGGHHHHHHHHHH!

    /me smites VB for causing damage to my brain

    Djikstra was right
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  7. #7
    Frenzied Member Zaei's Avatar
    Join Date
    Jul 2002
    Location
    My own little world...
    Posts
    1,710
    Originally posted by parksie
    What? AAAAAAAARRRRRGGGHHHHHHHHHH!

    /me smites VB for causing damage to my brain

    Djikstra was right
    Yup!

    Z.

  8. #8
    The Devil crptcblade's Avatar
    Join Date
    Aug 2000
    Location
    Quetzalshacatenango
    Posts
    9,091
    * pretends to understand *

    Yup!

    Laugh, and the world laughs with you. Cry, and you just water down your vodka.


    Take credit, not responsibility

  9. #9
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    * admits he doesn't understand *

    Who's Djikstra?
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  10. #10
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    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.
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  11. #11
    The Devil crptcblade's Avatar
    Join Date
    Aug 2000
    Location
    Quetzalshacatenango
    Posts
    9,091

    Thumbs up

    Sounds like he's been reading my resume.

    Laugh, and the world laughs with you. Cry, and you just water down your vodka.


    Take credit, not responsibility

  12. #12
    Frenzied Member Zaei's Avatar
    Join Date
    Jul 2002
    Location
    My own little world...
    Posts
    1,710
    Originally posted by parksie
    Computer Science guy. Fairly famous
    Twas a sad day that he died =(

    Z.

  13. #13
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    True. At least we still have Knuth

    I really need to order that book one of these days.
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  14. #14
    Frenzied Member Zaei's Avatar
    Join Date
    Jul 2002
    Location
    My own little world...
    Posts
    1,710
    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...

    Z.

  15. #15
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    And the fourth once it's finished, yep.

    I'm taking it as one book, 3 volumes
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  16. #16
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    Aahhh...

    Very true indeed.

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

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  17. #17
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    Hmmm....volumes 1 and 2 from amazon are only £69.66 together, with no postage.....I am very tempted. Will check around first though
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  18. #18
    Frenzied Member Zaei's Avatar
    Join Date
    Jul 2002
    Location
    My own little world...
    Posts
    1,710
    They always have the three book set sitting out for $150 at B&N... always tempting... =)

    Z.

  19. #19
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    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
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width