Dialog Boxes in Visual C++

This is a discussion on Dialog Boxes in Visual C++ within the Windows Programming forums, part of the Platform Specific Boards category; I can't figure out why but I always get the same errors in a simple dialog box application. I followed ...

  1. #1
    EmilyH
    Guest

    Angry Dialog Boxes in Visual C++

    I can't figure out why but I always get the same errors in a simple dialog box application. I followed the instructions exactly in the book. I'm still getting the following errors. Can anyone help? I'm just trying to call a simple dialog box. CBurgers is the class & IDD_BURGERS is the name of the box.

    void CProjectDlg::OnBurgers()
    {

    CBurgers IDD_BURGERS;
    IDD_BURGERS.DoModal();
    }

    Compiling...
    projectDlg.cpp
    C:\Program Files\Microsoft Visual Studio\Vc98\Emh\Radio\project\projectDlg.cpp(184) : error C2143: syntax error : missing ';' before 'constant'
    C:\Program Files\Microsoft Visual Studio\Vc98\Emh\Radio\project\projectDlg.cpp(185) : error C2228: left of '.DoModal' must have class/struct/union type
    Error executing cl.exe.

  2. #2
    the hat of redundancy hat nvoigt's Avatar
    Join Date
    Aug 2001
    Location
    Hannover, Germany
    Posts
    3,139
    If IDD_BURGERS is a #define in your resource file, which I assume,
    rename your CBurger instance to 'theCBurger' or something.
    IDD_BURGERS is already defined as something else.
    hth
    -nv

    She was so Blonde, she spent 20 minutes looking at the orange juice can because it said "Concentrate."

    When in doubt, read the FAQ.
    Then ask a smart question.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. We Got _DEBUG Errors
    By Tonto in forum Windows Programming
    Replies: 5
    Last Post: 12-22-2006, 05:45 PM
  2. C++ std routines
    By siavoshkc in forum C++ Programming
    Replies: 33
    Last Post: 07-28-2006, 01:13 AM
  3. load gif into program
    By willc0de4food in forum Windows Programming
    Replies: 14
    Last Post: 01-11-2006, 10:43 AM
  4. Errors with including winsock 2 lib
    By gamingdl'er in forum C++ Programming
    Replies: 3
    Last Post: 12-05-2005, 08:13 PM
  5. Learning OpenGL
    By HQSneaker in forum C++ Programming
    Replies: 7
    Last Post: 08-06-2004, 09:57 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21