Click here to Skip to main content
15,891,777 members
Please Sign up or sign in to vote.
3.00/5 (1 vote)
See more:
i create a window using create window
C++
AFX_MANAGE_STATE(AfxGetStaticModuleState( ));		
	HINSTANCE hInst=AfxGetInstanceHandle();
	m_gHDilog = CreateDialog (hInst, MAKEINTRESOURCE (IDD_DIALOG1), m_hWnd, DialogProc);
	if(m_gHDilog!=NULL)
	{
		CRect rc;
		::GetClientRect(m_hWnd,rc);
		::MoveWindow(m_gHDilog,rc.left,rc.top,rc.Width(),rc.Height(),false);
		::ShowWindow(m_gHDilog,SW_SHOW);

now i want to disable parent window control.how can i do it. can any one help me.
Posted
Updated 2-Jul-11 0:53am
v3
Comments
Richard MacCutchan 2-Jul-11 6:56am    
Why? The reason for using a modeless dialog is so that the parent window remains active. If you want the parent to be disabled then use a modal dialog instead.
Sergey Alexandrovich Kryukov 2-Jul-11 11:15am    
I think this is the solution.
--SA
Albert Holguin 2-Jul-11 20:18pm    
Agree as well, post as solution?
Richard MacCutchan 3-Jul-11 3:09am    
Possibly, but I'm not totally sure of what the OP is trying to achieve. As with so many questions we may never know. :(
Mohibur Rashid 2-Jul-11 8:36am    
Agree with you Mac

1 solution

their is a nice function ::EnableWindow( hwnd. FALSE)
 
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