Click here to Skip to main content
15,920,633 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionControl IDs not showing in ClassWizard Pin
jpyp17-May-07 6:58
jpyp17-May-07 6:58 
AnswerRe: Control IDs not showing in ClassWizard Pin
David Crow17-May-07 7:12
David Crow17-May-07 7:12 
AnswerRe: Control IDs not showing in ClassWizard Pin
jpyp17-May-07 8:40
jpyp17-May-07 8:40 
QuestionThread storage Pin
tom groezer17-May-07 5:19
tom groezer17-May-07 5:19 
AnswerRe: Thread storage Pin
David Crow17-May-07 5:23
David Crow17-May-07 5:23 
AnswerRe: Thread storage Pin
confid3nce17-May-07 7:14
confid3nce17-May-07 7:14 
GeneralRe: Thread storage Pin
David Crow17-May-07 7:17
David Crow17-May-07 7:17 
GeneralRe: Thread storage Pin
Hamid_RT17-May-07 9:11
Hamid_RT17-May-07 9:11 
QuestionEmbed Access GUI in C++ Dialog Pin
TedWagstaff17-May-07 5:04
TedWagstaff17-May-07 5:04 
QuestionRe: Embed Access GUI in C++ Dialog Pin
David Crow17-May-07 5:24
David Crow17-May-07 5:24 
AnswerRe: Embed Access GUI in C++ Dialog Pin
TedWagstaff17-May-07 5:45
TedWagstaff17-May-07 5:45 
QuestionSimple Question: Resizing: Pin
zqueezy17-May-07 4:53
zqueezy17-May-07 4:53 
AnswerRe: Simple Question: Resizing: Pin
zqueezy17-May-07 5:12
zqueezy17-May-07 5:12 
AnswerRe: Simple Question: Resizing: Pin
CPallini17-May-07 5:14
mveCPallini17-May-07 5:14 
GeneralRe: Simple Question: Resizing: Pin
zqueezy17-May-07 5:19
zqueezy17-May-07 5:19 
AnswerRe: Simple Question: Resizing: Pin
Nelek17-May-07 20:27
protectorNelek17-May-07 20:27 
Hi,

another way to do this is to change the CSize into ChildFrm.cpp in the function PrecreateWindow ()

For xample: i make different window sizes depending of the parent element of the window
BOOL CChildFrame::PreCreateWindow(CREATESTRUCT& cs)
{	if( !CMDIChildWnd::PreCreateWindow(cs) )
		return FALSE;

	//Set the configuration for the NewViews
	CMDIChildWnd* pMDIActive = MDIGetActive();
	CDocument* pDoc = pMDIActive->GetActiveDocument();

	if ((pDoc) && (pDoc->m_szNewFrameName != ""))
	{	cs.style = WS_SYSMENU | WS_CAPTION | WS_OVERLAPPED;

		if (pDoc->m_pObject1 || pDoc->m_pObject2)
		{	cs.cx = 415;		cs.cy = 260;	}
		else if (pDoc->m_pObject3->m_nType == 0)
		{	cs.cx = 517;		cs.cy = 421;	}
		else if (pDoc->m_pObject3->m_nType == 2)
		{	cs.cx = 610;		cs.cy = 435;	}

		cs.lpszName = pDoc->m_szNewFrameName;
	}
	return TRUE;
}


With this I put the caption of the new view according to the name of the element and some other parameters, and the size according to the type of the element.

Greetings.

--------
M.D.V.

If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?

QuestionConvert or Add? Pin
Star0917-May-07 4:11
Star0917-May-07 4:11 
QuestionRe: Convert or Add? Pin
David Crow17-May-07 5:20
David Crow17-May-07 5:20 
GeneralRe: Convert or Add? Pin
Star0917-May-07 6:12
Star0917-May-07 6:12 
QuestionHow to Get the caption of a menu item Pin
jannathali17-May-07 3:15
jannathali17-May-07 3:15 
AnswerRe: How to Get the caption of a menu item Pin
Try17-May-07 3:21
Try17-May-07 3:21 
AnswerRe: How to Get the caption of a menu item Pin
Ravi Bhavnani17-May-07 4:16
professionalRavi Bhavnani17-May-07 4:16 
QuestionManifest files in VC2005 Pin
tom groezer17-May-07 2:48
tom groezer17-May-07 2:48 
QuestionValidating user credentials on a Stand alone system Pin
chitrag_raju17-May-07 2:41
chitrag_raju17-May-07 2:41 
QuestionRe: Validating user credentials on a Stand alone system Pin
David Crow17-May-07 5:26
David Crow17-May-07 5:26 

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.