Results 1 to 12 of 12

Thread: [Resolved] MFC: Show Dialog?

Threaded View

  1. #1

    Thread Starter
    Stuck in the 80s The Hobo's Avatar
    Join Date
    Jul 2001
    Location
    Michigan
    Posts
    7,256

    [Resolved] MFC: Show Dialog?

    I'm showing a dialog via this code:

    Code:
    BOOL CListworkApp::InitInstance() {
        CListworkDlg dlg;
        m_pMainWnd = &dlg;
        int nResponse = dlg.DoModal();
    
        if (nResponse == IDOK) {
    
        } else if (nResponse == IDCANCEL) {
    
        }
    
        return FALSE;
    }
    Which is the default code provided by the wizard. However, when I remove the buttons and the code, the app disappears when enter is pressed.

    I'm assuming there's another method to show the dialog so that this doesn't happen?
    Last edited by The Hobo; Mar 31st, 2003 at 07:19 PM.
    My evil laugh has a squeak in it.

    kristopherwilson.com

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