Click here to Skip to main content
15,911,785 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: GetProcAddress failed? Pin
George_George30-Sep-08 1:36
George_George30-Sep-08 1:36 
Questionhow to resume a thread which was created by _beginthreadex? Pin
kcynic28-Sep-08 3:24
kcynic28-Sep-08 3:24 
QuestionRe: how to resume a thread which was created by _beginthreadex? Pin
CPallini28-Sep-08 4:32
mveCPallini28-Sep-08 4:32 
AnswerRe: how to resume a thread which was created by _beginthreadex? Pin
kcynic28-Sep-08 14:07
kcynic28-Sep-08 14:07 
AnswerRe: how to resume a thread which was created by _beginthreadex? Pin
Mark Salsbery28-Sep-08 10:43
Mark Salsbery28-Sep-08 10:43 
GeneralRe: how to resume a thread which was created by _beginthreadex? Pin
kcynic28-Sep-08 18:09
kcynic28-Sep-08 18:09 
Questiongu and pc command of Windbg Pin
George_George28-Sep-08 1:33
George_George28-Sep-08 1:33 
QuestionHow to change the heights of the rows of a splitter proportional to the size of the windows ! Pin
CrocodileBuck28-Sep-08 0:49
CrocodileBuck28-Sep-08 0:49 
Hi everybody,

i have a problem with the sizing of the rows of a splitter.
I coded a little sample with a main_splitter with 4 rows.
This is how it looks at startup.

http://filehosting.at/images/download.php?file=4dbf41d6c1a6e28de6a24e27e60ae9ee
[^]

Then the user could change the height of the rows, like this for example:

http://filehosting.at/images/download.php?file=d3f0203679e34d9bb3159d231e898d89[^]

But wen the user now maximize the window i want change the height proportional to the size of the window.
An when he change the height of the rows in fulscreen and restoe the windows i will change
the height of the rows proportional again.

here is my code, i try to figure it out fore hours D'Oh! | :doh: now but it won't work Cry | :((


<code>/************************************************************************/
/* create the window and the splitters                                  */
/************************************************************************/
BOOL CMainFrame::OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext) 
{

	CRect spRect;
	CRect cr; 
	GetClientRect(&cr);
	GetClientRect(&spRect);
//------- Create main_splitter ----------
	m_Splitter_Main.CreateStatic(this, 4, 1); 

	m_Splitter_Main.SetRowInfo(0, spRect.Height()/4, 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.CreateView(1, 0, RUNTIME_CLASS(CTest_01View), CSize(0, cr.Height()/4), pContext); 
	m_Splitter_Main.CreateView(2, 0, RUNTIME_CLASS(CTest_01View), CSize(0, cr.Height()/4), pContext); 


	m_Splitter_Child_1.CreateStatic(&m_Splitter_Main, 1, 3, WS_CHILD | WS_VISIBLE, m_Splitter_Main.IdFromRowCol(0, 0)); 
	m_Splitter_Child_1.CreateView(0, 0, RUNTIME_CLASS(CTest_01View), CSize(cr.Width()/3, 0), pContext); 
	m_Splitter_Child_1.CreateView(0, 1, RUNTIME_CLASS(CTest_01View), CSize(cr.Width()/3, 0), pContext); 
	m_Splitter_Child_1.CreateView(0, 2, RUNTIME_CLASS(CTest_01View), CSize(cr.Width()/3, 0), pContext);

 	m_Splitter_Child_2.CreateStatic(&m_Splitter_Main, 1, 2, WS_CHILD | WS_VISIBLE, m_Splitter_Main.IdFromRowCol(3, 0)); 
 	m_Splitter_Child_2.CreateView(0, 0, RUNTIME_CLASS(CTest_01View), CSize(cr.Width()/2, 0), pContext);
	m_Splitter_Child_2.CreateView(0, 1, RUNTIME_CLASS(CTest_01View), CSize(cr.Width()/2, 0), pContext); 

	return TRUE;	
}

/************************************************************************/
/* resize the splitter                                                  */
/************************************************************************/
void CMainFrame::OnSize(UINT nType, int cx, int cy) 
{
	CFrameWnd::OnSize(nType, cx, cy);
	int iCur_cy, iMin_cy;
	iMin_cy = 0;
	CRect spRect;
	m_Splitter_Main.GetClientRect(spRect);

	if ((nType == SIZE_MAXIMIZED)||(m_Splitter_Main.IsWindowVisible() && nType == SIZE_RESTORED))
	{
		m_Splitter_Main.GetRowInfo(0 ,iCur_cy, iMin_cy);
	 	m_Splitter_Main.SetRowInfo(0, iCur_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();	
	}	


}
</code>


I hope i could discribe the problem good enough !
Many thanks & best regards
Croc Smile | :)
Questionquestion about cin Pin
George_George27-Sep-08 22:40
George_George27-Sep-08 22:40 
AnswerRe: question about cin Pin
followait28-Sep-08 3:20
followait28-Sep-08 3:20 
GeneralRe: question about cin Pin
George_George28-Sep-08 3:38
George_George28-Sep-08 3:38 
GeneralRe: question about cin Pin
followait28-Sep-08 4:16
followait28-Sep-08 4:16 
GeneralRe: question about cin Pin
George_George29-Sep-08 23:11
George_George29-Sep-08 23:11 
QuestionHow to determine if a GDI object handle is valid? Pin
followait27-Sep-08 20:10
followait27-Sep-08 20:10 
AnswerRe: How to determine if a GDI object handle is valid? Pin
Gary R. Wheeler28-Sep-08 2:17
Gary R. Wheeler28-Sep-08 2:17 
AnswerRe: How to determine if a GDI object handle is valid? Pin
Michael Dunn28-Sep-08 12:32
sitebuilderMichael Dunn28-Sep-08 12:32 
QuestionSharing DLL data among different process Pin
ForNow27-Sep-08 19:07
ForNow27-Sep-08 19:07 
Questionhow to catch the redraw event of flash control? Pin
61934514227-Sep-08 16:51
61934514227-Sep-08 16:51 
QuestionDialog and Propertypage question? Pin
Rangarajan Varadan27-Sep-08 16:48
Rangarajan Varadan27-Sep-08 16:48 
QuestionWhat is the difference among the OnClose(),OnDestroy() and the DestroyWindow()? Pin
aygrhnwms30427-Sep-08 16:32
aygrhnwms30427-Sep-08 16:32 
QuestionRe: What is the difference among the OnClose(),OnDestroy() and the DestroyWindow()? Pin
David Crow27-Sep-08 16:38
David Crow27-Sep-08 16:38 
AnswerRe: What is the difference among the OnClose(),OnDestroy() and the DestroyWindow()? Pin
aygrhnwms30427-Sep-08 21:02
aygrhnwms30427-Sep-08 21:02 
AnswerRe: What is the difference among the OnClose(),OnDestroy() and the DestroyWindow()? Pin
Ali Tavakol28-Sep-08 4:47
Ali Tavakol28-Sep-08 4:47 
AnswerRe: What is the difference among the OnClose(),OnDestroy() and the DestroyWindow()? Pin
Michael Dunn28-Sep-08 12:34
sitebuilderMichael Dunn28-Sep-08 12:34 
Questionreading text file Pin
nomi khan27-Sep-08 12:55
nomi khan27-Sep-08 12:55 

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.