Jump to content
  • Advertisement
Sign in to follow this  
D3DXVECTOR3

[MFC] What am I doing wrong?? (SOLVED)

This topic is 4765 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Im seeing this:
-------------------------------------
|        |                          |
|        |                          |
|        |                          |
|        |                          |
|        |                          |
|        |                          |
|        |                          |
|        |                          |
|        |                          |
|        |                          |
|        |                          |
-------------------------------------


but it should be like this:
-------------------------------------
|        |                          |
|        |                          |
|        |                          |
|        |                          |
|        |                          |
|        |--------------------------|
|        |                          |
|        |                          |
|        |                          |
|        |                          |
|        |                          |
-------------------------------------


Here is the source for the splitting. Im not getting any error messages/warnings the application fucntions perfectly.
BOOL CMainFrame::OnCreateClient(LPCREATESTRUCT /*lpcs*/, CCreateContext* pContext)
{
	// create a splitter with 1 row, 2 columns
	if (!m_wndSplitter.CreateStatic(this, 1, 2))
	{
		TRACE0("Failed to create m_wndSplitter\n");
		return FALSE;
	}

	// add the second splitter pane - an input view in column 1
	if (!m_wndSplitter.CreateView(0, 0, RUNTIME_CLASS(CInfoPannel), CSize(200, 0), pContext))
	{
		TRACE0("Failed to create CInfoPannel pane\n");
		return FALSE;
	}


	// add the first splitter pane - the default view in column 0
	if (!m_wndSplitter.CreateView(0, 1, pContext->m_pNewViewClass, CSize(256, 50), pContext))
	{
		TRACE0("Failed to create ViewPort pane\n");
		return FALSE;
	}

	CRect cr;
	GetClientRect( &cr );

	if ( !m_mapSplitter.CreateStatic( &m_wndSplitter, 2, 1, WS_CHILD | WS_VISIBLE, m_wndSplitter.IdFromRowCol( 0, 1 ) ) )
	{
		TRACE0("Failed to create m_mapSplitter\n");
		return FALSE;
	}

	// add the first splitter pane - the default view in column 0
	if (!m_mapSplitter.CreateView(0, 0, pContext->m_pNewViewClass, CSize(cr.Width(), cr.Height()/2), pContext))
	{
		TRACE0("Failed to create TileSet pane\n");
		return FALSE;
	}

	// add the first splitter pane - the default view in column 0
	if (!m_mapSplitter.CreateView(1, 0, pContext->m_pNewViewClass, CSize(cr.Width(), cr.Height()/2), pContext))
	{
		TRACE0("Failed to create ImageMap pane\n");
		return FALSE;
	}

	// activate the input view
	SetActiveView((CView*)m_wndSplitter.GetPane(0,1));

	return TRUE;
}


[Edited by - D3DXVECTOR3 on June 29, 2005 8:06:23 AM]

Share this post


Link to post
Share on other sites
Advertisement
I got it :)


BOOL CMainFrame::OnCreateClient(LPCREATESTRUCT /*lpcs*/, CCreateContext* pContext)
{
// create a splitter with 1 row, 2 columns
if (!m_wndSplitter.CreateStatic(this, 1, 2))
{
TRACE0("Failed to create m_wndSplitter\n");
return FALSE;
}

// add the second splitter pane - an input view in column 1
if (!m_wndSplitter.CreateView(0, 0, RUNTIME_CLASS(CInfoPannel), CSize(200, 0), pContext))
{
TRACE0("Failed to create CInfoPannel pane\n");
return FALSE;
}

CRect cr;
GetClientRect( &cr );

if (!m_wndSplitter2.CreateStatic( &m_wndSplitter, 2, 1, WS_CHILD | WS_VISIBLE | WS_BORDER, m_wndSplitter.IdFromRowCol( 0, 1 ) ) )
{
TRACE0("Failed to create m_mapSplitter\n");
return FALSE;
}

// add the first splitter pane - the default view in column 0
if (!m_wndSplitter2.CreateView(0, 0, pContext->m_pNewViewClass, CSize(cr.Width(), cr.Height()/2), pContext))
{
TRACE0("Failed to create TileSet pane\n");
return FALSE;
}

// add the first splitter pane - the default view in column 0
if (!m_wndSplitter2.CreateView(1, 0, pContext->m_pNewViewClass, CSize(cr.Width(), cr.Height()/2), pContext))
{
TRACE0("Failed to create ImageMap pane\n");
return FALSE;
}

return TRUE;
}

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!