Click here to Skip to main content
15,885,216 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How do I ensure the frame window I create have my own chosen sizes and is positioned at my own chosen location?

Because I needed a dialogue box with split window, I decided to use a frame window, a splitter and form views.

Every thing went well except that the frame window I created would not assume the dimensions I stated and would not stay in the position I specified. It simply fills up my app's main window so that neither it nor the app,s main window are distinguishable in dimension and position.

What can I do to remedy this?

The code I used to create the frame window are shown below.

C++
void CMainFrame::OnMyDialogue()
{
         MyDialogue *pDialog =  new MyDialogue;

	CRect rc(200,200,200,200);
	pDialog->Create(NULL,_T("Test"),WS_POPUPWINDOW,rc,this);
	
	pDialog->ShowWindow(SW_NORMAL);
	pDialog->UpdateWindow();

}


What could be wrong?


P.S.
This is the first time I am using a form view. Is it the normal way form views behave?

Do they simply fill up the entire screen?
Posted
Updated 22-Dec-14 21:16pm
v2
Comments
Richard MacCutchan 23-Dec-14 4:19am    
Did you use the template provided in Visual Studio to create the FormView application?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900