MFC Dialog Problem

This is a discussion on MFC Dialog Problem within the Windows Programming forums, part of the Platform Specific Boards category; Im having a bit of an issue with one of my MFC dialogs. After declaring a variable of the dialog ...

  1. #1
    Registered User
    Join Date
    Dec 2006
    Posts
    15

    MFC Dialog Problem

    Im having a bit of an issue with one of my MFC dialogs. After declaring a variable of the dialog class, it gets NULL... like this.

    CMyDialog dlg;

    so my progam crashes as soon as I use i etc..
    m_dlg = &dlg;

    Its a visual studio 2k3 generated dialog. Which wa working initially.

    Could anyone please tell me if they have any idea what the issue might be.
    The constructor is called fine, so im not sure why it would be a null object.

    Thanks.

  2. #2
    Registered User
    Join Date
    Dec 2006
    Posts
    15
    ok, i fixed it.

    Pretty stupid problem really.
    When I was compiling with VS2k3, it wasn't remaking my .obj files, so it wasn't detecting that there were link issues such as redefining a variable.

    Just clearing my debug folder showed me the link errors next compile.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. MFC Bring up a dialog.
    By guitarist809 in forum Windows Programming
    Replies: 5
    Last Post: 08-06-2007, 01:31 AM
  2. A question related to strcmp
    By meili100 in forum C++ Programming
    Replies: 6
    Last Post: 07-07-2007, 02:51 PM
  3. Replies: 6
    Last Post: 04-27-2004, 08:02 PM
  4. Dialog Windows Hidden Problem :: MFC
    By kuphryn in forum Windows Programming
    Replies: 0
    Last Post: 11-27-2002, 10:11 PM
  5. VS.net mfc dialog app
    By Unregistered in forum Windows Programming
    Replies: 0
    Last Post: 05-15-2002, 05:23 PM

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