CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Dec 2009
    Posts
    161

    DialogBox vs CreateDialog

    Hi,

    Is there any differences using one or another?

    Code:
    DialogBox(hInst, MAKEINTRESOURCE(IDD_POPUP), hWnd, (DLGPROC)procPopup);
    
    ShowWindow(
    		CreateDialog(hInst, MAKEINTRESOURCE(IDD_POPUP), hWnd, (DLGPROC)procPopup),
    		SW_SHOW
    );
    Should one be preferred to another?

    thanks

  2. #2
    Join Date
    Aug 2000
    Location
    New York, NY, USA
    Posts
    5,656

    Re: DialogBox vs CreateDialog

    Quote Originally Posted by THEARTOFWEB View Post
    Is there any differences using one or another?
    Yes, the first function creates modal dialog, the second - modeless.
    Quote Originally Posted by THEARTOFWEB View Post
    Should one be preferred to another?
    Hmmm... If I need a modal dialog, I woul prefer the first one
    Vlad - MS MVP [2007 - 2012] - www.FeinSoftware.com
    Convenience and productivity tools for Microsoft Visual Studio:
    FeinWindows - replacement windows manager for Visual Studio, and more...

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

Featured