Click here to Skip to main content
12,453,672 members (93,442 online)
Rate this:
 
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
Rezame1K
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
Top Experts
Last 24hrsThis month


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

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100