Click here to Skip to main content
16,008,719 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Site Administration Pin
Abbas_Riazi28-Jan-03 5:02
professionalAbbas_Riazi28-Jan-03 5:02 
Questionhow to disable button on CDlgBar? Pin
gjun lee28-Jan-03 4:03
gjun lee28-Jan-03 4:03 
AnswerRe: how to disable button on CDlgBar? Pin
Rage28-Jan-03 4:16
professionalRage28-Jan-03 4:16 
GeneralRe: how to disable button on CDlgBar? Pin
gjun lee28-Jan-03 5:01
gjun lee28-Jan-03 5:01 
GeneralLocation of call to base class Pin
ns28-Jan-03 4:02
ns28-Jan-03 4:02 
GeneralRe: Location of call to base class Pin
Rage28-Jan-03 4:24
professionalRage28-Jan-03 4:24 
GeneralThanks!Really helpful info Pin
ns28-Jan-03 4:50
ns28-Jan-03 4:50 
GeneralCentering the Cview in MDI Pin
ns28-Jan-03 3:56
ns28-Jan-03 3:56 
From a CP article by Brian Hart he has the following:

void CMainFrame::RecalcLayout(BOOL bNotify) 
{
	CWnd* pClientWnd = CWnd::FromHandle(m_hWndMDIClient);
<code>
	// Hopefully this should notify CMDIChildWnds that their
	// client area is changing size -- better re-center themselves!</code>	

        pClientWnd->SendMessageToDescendants(WM_SIZEPARENT,
		0, 0, FALSE, FALSE);
	
	CMDIFrameWnd::RecalcLayout(bNotify);
}



Its used in:

void CMainFrame::OnSize(UINT nType, int cx, int cy) 
{
	CMDIFrameWnd::OnSize(nType, cx, cy);
	
		RecalcLayout();		
}

The comment
<br />
	// Hopefully this should notify CMDIChildWnds that their<br />
	// client area is changing size -- better re-center themselves!


worries me.

It seems to work but is it not reliable? Any suggestions/improvements/comments?

Appreciate your help,
ns
GeneralHelp with CString!!! Pin
Lucky200228-Jan-03 2:17
Lucky200228-Jan-03 2:17 
GeneralRe: Help with CString!!! Pin
HENDRIK R28-Jan-03 2:23
HENDRIK R28-Jan-03 2:23 
GeneralRe: Help with CString!!! Pin
#realJSOP28-Jan-03 2:28
professional#realJSOP28-Jan-03 2:28 
GeneralRe: Help with CString!!! Pin
HENDRIK R28-Jan-03 2:36
HENDRIK R28-Jan-03 2:36 
GeneralRe: Help with CString!!! Pin
Lucky200228-Jan-03 3:02
Lucky200228-Jan-03 3:02 
GeneralRe: Help with CString!!! Pin
#realJSOP15-May-07 2:01
professional#realJSOP15-May-07 2:01 
GeneralRe: Help with CString!!! Pin
Lucky200228-Jan-03 3:01
Lucky200228-Jan-03 3:01 
Generalredirect user I/O to a temporary ‘buffer’ Pin
rohit.dhamija28-Jan-03 2:09
rohit.dhamija28-Jan-03 2:09 
GeneralRe: redirect user I/O to a temporary ‘buffer’ Pin
Mike Nordell28-Jan-03 2:19
Mike Nordell28-Jan-03 2:19 
GeneralRe: redirect user I/O to a temporary ‘buffer’ Pin
jhwurmbach28-Jan-03 5:03
jhwurmbach28-Jan-03 5:03 
Generalhelp!!! Pin
xxhimanshu28-Jan-03 1:54
xxhimanshu28-Jan-03 1:54 
GeneralRe: help!!! Pin
Rage28-Jan-03 1:58
professionalRage28-Jan-03 1:58 
GeneralRe: help!!! Pin
xxhimanshu28-Jan-03 2:04
xxhimanshu28-Jan-03 2:04 
GeneralRe: help!!! Pin
Rage28-Jan-03 2:31
professionalRage28-Jan-03 2:31 
GeneralEncrypt password Pin
Wim Jans28-Jan-03 1:34
Wim Jans28-Jan-03 1:34 
GeneralRe: Encrypt password Pin
Mike Nordell28-Jan-03 1:40
Mike Nordell28-Jan-03 1:40 
GeneralRe: Encrypt password Pin
Wim Jans28-Jan-03 2:11
Wim Jans28-Jan-03 2:11 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.