1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

C++ MFC - Menu Items Disabled

Discussion in 'HTML, Graphics & Programming' started by adam3223, 17 Jan 2006.

  1. adam3223

    Gangster

    Joined: 22 Jul 2004

    Posts: 230

    Location: Nottingham, UK

    I've been teaching myself MFC from some tutorials on the web and it's going okish - i think.

    Basically i've added a menu to my window, but all the menu items are disabled, i thought that was because i hadn't implemented them, so i wrote code for them and they're still not working.

    Can someone take a look at the source code please and tell me what i'm doing wrong? :confused:

    Oh i'm using VC++6
    and does VS.net have MFC? and is it backwards compatible with VC6 (because uni only has VC6)

    Source
     
  2. happytechie

    Soldato

    Joined: 18 Oct 2002

    Posts: 5,601

    Location: Surrey

    VS.net does have MFC, I think it all runs as unmanaged code in the .net runtime.

    I can't get your code to build in my copy of VS.net 2005:

    the code should be backwards compatible but the project files won't be

    Error 1 error C2440: 'static_cast' : cannot convert from 'bool (__thiscall CButtonWindow::* )(CDC *)' to 'BOOL (__thiscall CWnd::* )(CDC *)' c:\mfc3\mfc3\main.cpp 74

    HT
     
  3. adam3223

    Gangster

    Joined: 22 Jul 2004

    Posts: 230

    Location: Nottingham, UK

    I'll move to VS2005 sometime then.

    But until then; It compiles ok in VS6, but that function isn't important, so you can just comment it out.

    Does anyone know whats wrong??