Click here to Skip to main content
15,885,546 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
I have project in win32 and it creates one dialog include some Control tools.

When I using this function:
C++
nRet = DialogBoxParam(hInst1, MAKEINTRESOURCE (IDD_DIALOG2), hWnd, LoginDlgProc1, 0);


It creates Dialog box and when using this function not creates:
C++
HWND g_hDlg = CreateDialogParam(hInst1, MAKEINTRESOURCE(IDD_DIALOG2), hWnd, LoginDlgProc1, 1);


Any problem with second function?
Regards,
Posted

Must use ShowWindow() function for that.
 
Share this answer
 
See this MSDN page[^], with particular reference to the difference between Modal and Modeless dialogs.
 
Share this answer
 
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).
 
Share this answer
 

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900