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?
Must use ShowWindow() function for that.
See this MSDN page
], with particular reference to the difference between Modal and Modeless dialogs.
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).
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)