Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C++
Hi,
I have project in win32 and it creates one dialog include some Control tools.
 
When I using this function:
nRet = DialogBoxParam(hInst1, MAKEINTRESOURCE (IDD_DIALOG2), hWnd, LoginDlgProc1, 0);
 
It creates Dialog box and when using this function not creates:
HWND g_hDlg = CreateDialogParam(hInst1, MAKEINTRESOURCE(IDD_DIALOG2), hWnd, LoginDlgProc1, 1);
 
Any problem with second function?
Regards,
Posted 22-Nov-12 5:42am
Rezame951
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

Must use ShowWindow() function for that.
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

See this MSDN page[^], with particular reference to the difference between Modal and Modeless dialogs.
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 3

As Richard and Rezame stated, the answer lies in modeless vs. modal window behavior. One of those calls creates a modal window that is by default shown, the other call creates a modeless window that is not necessarily shown by default (window exists but may be invisible).
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Your Filters
Interested
Ignored
     
0 Sergey Alexandrovich Kryukov 710
1 OriginalGriff 543
2 Abhinav S 318
3 thatraja 245
4 Tadit Dash 140
0 Sergey Alexandrovich Kryukov 8,322
1 OriginalGriff 4,790
2 Peter Leow 3,784
3 Maciej Los 3,515
4 Er. Puneet Goel 3,107


Advertise | Privacy | Mobile
Web02 | 2.8.140415.2 | Last Updated 1 Dec 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Use
Layout: fixed | fluid