C++ Win32 Lesson 5: Adding Menu Items

  • Published on Jan 11, 2009
  • xoax.net
    Lesson Page:
    This C Win32 video tutorial shows how to add menus to a window and respond to menu click events.
    Please submit all questions to our forum:
    Copyright 2009 XoaX.net LLC
  • Howto & StyleHowto & Style

Comments • 24

  • ERNEST 326
    ERNEST 326 14 days ago

    Am i the only one in 2019?

  • Zero Ghost
    Zero Ghost 2 years ago

    is this SDI or MDI?

  • MrSyabo
    MrSyabo 2 years ago


  • Pedro Vaz
    Pedro Vaz 4 years ago

    i've created a project with 3 windows (hwnd), i'd like to put a menuItem in one of them, but i dont know how, somebody help ?

  • fould13
    fould13 4 years ago

    This part was very helpful, now I finally know how to use resource files!

  • Jose Lima
    Jose Lima 5 years ago

    Destestáveis propagandas, pareçem pedras pontiagudas no sapato

  • MrWaras
    MrWaras 5 years ago

    ok, found out in lesson11 it IS possible to make menus, all u need to do set
    wincl.lpszMenuName = MAKEINTRESOURCE(IDC_WIN32LESSON1);
    and follow everything else as in this lesson.
    I don't know why in lesson1 code it's set to NULL...

  • MrWaras
    MrWaras 5 years ago

    I think theres a spelling error,on the site its gbDrawLine, gbDrawEllipse, and in this video its bDrawLine, bDrawEllipse
    I'm also interested too If theres a way to make menus not in VC++

  • Black Manatee
    Black Manatee 6 years ago

    Great tutorial, helped out a lot!

  • Amandeep Dhari
    Amandeep Dhari 6 years ago

    can any one help, i fllowed what he done in the vid but my sub items are red green blue and black, to change the coulor of the text it works but if i click blue then click red it dont change the colour plz help

  • Boris Jakovljević
    Boris Jakovljević 6 years ago

    Didn't work for me. The menu didn't show up at all (Draw).

  • mrpervie86
    mrpervie86 7 years ago

    how do you make a submenu using this method?

  • Philluminati
    Philluminati 7 years ago

    This is _really_ helpful thank you ever so much. I'm a Linux user who knows C++ so I needed someone to help me wade through the basic overall structure of a Win32 program and how to use Visual Studio C++ Express. This has been great thanks. @iXavierProductions: This isn't supposed to be an intro to C++ the language.

    • Shwnu
      Shwnu Year ago

      Yeah, its completely different for linux

  • TheFantasticMrFish
    TheFantasticMrFish 8 years ago

    very helpful and clearly explained. Thanks very much :)

  • powerkiddd
    powerkiddd 8 years ago

    @powerkiddd never mind i found out what the problem was. i accedently deleted the endpaint stuff :o

  • powerkiddd
    powerkiddd 8 years ago

    i have a little problem, if i try to debug this code happens
    (203): error C2601: 'About' : local function definitions are illegal
    (143): this line contains a '{' which has not yet been matched
    (220): fatal error C1075: end of file found before the left brace { at (143) was matched
    and if i solve (143) i have 6 errors :(
    (175): error C2059: syntax error : 'if'
    error C2143: syntax error : missing ';' before '{'
    error C2447: { : missing function header (old-style formal list?)
    plz help!(190) same.

  • Sam Bishop
    Sam Bishop 9 years ago

    I was just wondering, i followed this video closely but for some reason when i start without debugging the window always has a line and ellipse, could you help?

  • Gajewa
    Gajewa 9 years ago

    I really like your tutorials. :D

  • Gajewa
    Gajewa 9 years ago

    Subscribed ^^

  • peefg
    peefg 10 years ago

    thanks man, excellent!

  • Lukas
    Lukas 10 years ago

    thankyou for this very nice tutorial

  • murshies
    murshies 10 years ago

    is there a way to make a menu if i'm not using VC++? i tried making my own .rc file and creating the menu code, and it runs, but the menu is still not there.

  • majesticdragoon
    majesticdragoon 10 years ago