Click here to Skip to main content
15,904,153 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
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 
AnswerRe: Validating user credentials on a Stand alone system Pin
chitrag_raju17-May-07 5:35
chitrag_raju17-May-07 5:35 
GeneralRe: Validating user credentials on a Stand alone system Pin
David Crow17-May-07 5:41
David Crow17-May-07 5:41 
GeneralRe: Validating user credentials on a Stand alone system Pin
Mark Salsbery17-May-07 6:33
Mark Salsbery17-May-07 6:33 
QuestionCreateProcess Pin
Try17-May-07 2:01
Try17-May-07 2:01 
AnswerRe: CreateProcess Pin
Arman S.17-May-07 2:18
Arman S.17-May-07 2:18 
GeneralRe: CreateProcess Pin
Try17-May-07 2:47
Try17-May-07 2:47 
GeneralRe: CreateProcess Pin
Mark Salsbery17-May-07 5:28
Mark Salsbery17-May-07 5:28 
AnswerRe: CreateProcess Pin
Nibu babu thomas17-May-07 2:20
Nibu babu thomas17-May-07 2:20 

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.