Click here to Skip to main content
16,005,162 members
Home / Discussions / Managed C++/CLI
   

Managed C++/CLI

 
GeneralRe: Unmanaged C++ code in managed env error(only framework installled) Pin
Mark Salsbery14-Oct-08 7:15
Mark Salsbery14-Oct-08 7:15 
GeneralYou missed one Pin
led mike14-Oct-08 8:05
led mike14-Oct-08 8:05 
GeneralRe: You missed one Pin
Mark Salsbery14-Oct-08 8:12
Mark Salsbery14-Oct-08 8:12 
Questionhelp needed.. STL Pin
wyl8613-Oct-08 0:40
wyl8613-Oct-08 0:40 
GeneralRe: help needed.. STL Pin
George L. Jackson13-Oct-08 4:28
George L. Jackson13-Oct-08 4:28 
QuestionNumber of controls on the Form. Pin
mikobi12-Oct-08 20:31
mikobi12-Oct-08 20:31 
AnswerRe: Number of controls on the Form. Pin
Lutosław15-Oct-08 12:17
Lutosław15-Oct-08 12:17 
QuestionSplitter, "OnSize strikes back !" Pin
CrocodileBuck11-Oct-08 1:00
CrocodileBuck11-Oct-08 1:00 
Hi;),

i have a Sdi with a splitter (4 rows).
When i click on the maximize button the window is maximized and the 1. splitter row changes its height proportionally Wink | ;) , but when i try to restore, nothing happens with the Splitter ;(.
Please help me !

Here is my code:
/************************************************************************/
/* Resizen des Splitters                                                */
/************************************************************************/
void CMainFrame::OnSize(UINT nType, int cx, int cy) 
{

	int			iCurRow_cy		= 0, iMin_cy	= 0;
	static int  iOldWnd_cy		= 0, iOldWnd_cx = 0;
 	int			iNewCurRow_cy	= 0;
	static int	iZaehler		= 0;

	static CString a, b, c, d;

	iZaehler++;
	if (iZaehler == 1)
	{
		iOldWnd_cy = cy;

		a.Format("%02d",iOldWnd_cy);
		b.Format("%02d",cy);
		c.Format("%02d",iCurRow_cy);
		d.Format("%02d",iNewCurRow_cy);
		MessageBox("iOldWnd_cy: "+ a + "\ncy:                " + b + "\niCurRow_cy: " + c + "\niNewCurRow_cy:   " + d,"in: iZaehler == 1 " ,MB_OK);
	}
	

	if ((nType == SIZE_MAXIMIZED))
	{   

 		m_Splitter_Main.GetRowInfo(0 ,iCurRow_cy, iMin_cy);
		iNewCurRow_cy =	(int)ResizeSplitter(cx, cy, iOldWnd_cx, iOldWnd_cy, iCurRow_cy, 1);

		a.Format("%02d",iOldWnd_cy);
		b.Format("%02d",cy);
		c.Format("%02d",iCurRow_cy);
		d.Format("%02d",iNewCurRow_cy);
  		MessageBox("iOldWnd_cy: "+ a + "\ncy:                " + b + "\niCurRow_cy: " + c + "\niNewCurRow_cy:   " + d,"in: SIZE_MAXIMIZED " ,MB_OK);

 	 	m_Splitter_Main.SetRowInfo(0, iNewCurRow_cy , 0);
	// 	m_Splitter_Main.SetRowInfo(1, spRect.Height()/4, 0);
	// 	m_Splitter_Main.SetRowInfo(2, spRect.Height()/4, 0);
	// 	m_Splitter_Main.SetRowInfo(3, spRect.Height()/4, 0);

		m_Splitter_Main.RecalcLayout();	

	}
	else if((!m_Splitter_Main.m_hWnd && nType == SIZE_RESTORED))
	{
  		m_Splitter_Main.GetRowInfo(0 ,iCurRow_cy, iMin_cy);
 		iNewCurRow_cy =	(int)ResizeSplitter(cx, cy, iOldWnd_cx, iOldWnd_cy, iCurRow_cy, (1));
		
		a.Format("%02d",iOldWnd_cy);
		b.Format("%02d",cy);
		c.Format("%02d",iCurRow_cy);
		d.Format("%02d",iNewCurRow_cy);
		MessageBox("iOldWnd_cy: "+ a + "\ncy:                " + b + "\niCurRow_cy: " + c + "\niNewCurRow_cy:   " + d,"in: SIZE_RESTORED " ,MB_OK);

  	 	m_Splitter_Main.SetRowInfo(0, iNewCurRow_cy , 0);
		m_Splitter_Main.RecalcLayout();	
	}

 CFrameWnd::OnSize(nType, cx, cy);

}


double CMainFrame::ResizeSplitter(int cx, int cy, int iOldWnd_cx, int iOldWnd_cy, int iCurRow_cy, int iZahl)
{
	double  iNewCurRow_cy;
	double  iDiff;
	double  iFaktor;

	CString ccc;
	CString ddd;
	CString aaa;
	CString bbb;

	iDiff = cy - iOldWnd_cy;
// 	cstrTest_1.Format("%01.5f",iDiff);
// 	MessageBox(cstrTest_1 ,"iDiff ",MB_OK);

	iFaktor = iDiff / cy;

	iNewCurRow_cy = (iCurRow_cy * ((iFaktor)+(iZahl)));
	
	return iNewCurRow_cy;


Many, many thanks !
Best regards !
Croc Wink | ;)
AnswerRe: Splitter, "OnSize strikes back !" Pin
Mark Salsbery11-Oct-08 6:27
Mark Salsbery11-Oct-08 6:27 
GeneralRe: Splitter, "OnSize strikes back !" Pin
CrocodileBuck11-Oct-08 7:51
CrocodileBuck11-Oct-08 7:51 
Questionurgent Pin
charusood8-Oct-08 2:53
charusood8-Oct-08 2:53 
AnswerRe: urgent Pin
Mark Salsbery8-Oct-08 7:14
Mark Salsbery8-Oct-08 7:14 
AnswerRe: urgent Pin
Paul Conrad9-Oct-08 7:03
professionalPaul Conrad9-Oct-08 7:03 
QuestionHeader in namespace Pin
piwi1337-Oct-08 22:30
piwi1337-Oct-08 22:30 
AnswerRe: Header in namespace Pin
Mark Salsbery8-Oct-08 7:21
Mark Salsbery8-Oct-08 7:21 
GeneralRe: Header in namespace Pin
piwi1338-Oct-08 22:39
piwi1338-Oct-08 22:39 
GeneralRe: Header in namespace Pin
Mark Salsbery9-Oct-08 5:06
Mark Salsbery9-Oct-08 5:06 
QuestionVisual c++ Net Designer Class disapear [modified] Pin
mikobi7-Oct-08 3:11
mikobi7-Oct-08 3:11 
AnswerRe: Visual c++ Net Designer Class disapear Pin
dybs10-Oct-08 18:56
dybs10-Oct-08 18:56 
GeneralRe: Visual c++ Net Designer Class disapear Pin
mikobi12-Oct-08 19:39
mikobi12-Oct-08 19:39 
AnswerRe: Visual c++ Net Designer Class disapear Pin
leonigah18-Dec-08 22:53
leonigah18-Dec-08 22:53 
AnswerRe: Visual c++ Net Designer Class disapear Pin
Dirkus Maximus18-Feb-10 18:16
Dirkus Maximus18-Feb-10 18:16 
QuestionCan't deliver MediaSample to two different output pins - Directshow problem Pin
itchy237-Oct-08 2:13
itchy237-Oct-08 2:13 
AnswerRe: Can't deliver MediaSample to two different output pins - Directshow problem Pin
Mark Salsbery7-Oct-08 4:36
Mark Salsbery7-Oct-08 4:36 
AnswerRe: Can't deliver MediaSample to two different output pins - Directshow problem Pin
Mark Salsbery9-Oct-08 8:25
Mark Salsbery9-Oct-08 8:25 

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.