Internet mail look

.


Having an Internet Mail look can be a bit hard to handle, but it could be quite rewarding .

This MFC42 code shows you how to provide this look in your apps.

.

The trick is to create a splitter window using another's handle. You can add any view you wish depending on the nature of your app. The image above shows a TreeView, RichView, and a FormView.

BOOL CMainFrame::OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext) 
{
	if(!m_splitterWnd1.CreateStatic(this, 1,2) ||
	   !m_splitterWnd1.CreateView(0, 0, RUNTIME_CLASS(CSplitterView), CSize(100,0), pContext) ||
	   !m_splitterWnd2.CreateStatic(&m_splitterWnd1, 2, 1, WS_CHILD | WS_VISIBLE, m_splitterWnd1.IdFromRowCol(0,1)) ||
	   !m_splitterWnd2.CreateView(0, 0, RUNTIME_CLASS(CMFormView), CSize(0, 355),pContext) ||
	   !m_splitterWnd2.CreateView(1, 0, RUNTIME_CLASS(CMRichView), CSize(0, 0),pContext))
		{
			return FALSE;
		}		
	return TRUE;
}

Download Source Code and Example (41 Kb)

Last updated: 21 June 1998



Comments

  • Nice effort

    Posted by Legacy on 05/08/2003 12:00am

    Originally posted by: Elango C

    I just downloaded the code for the above GUI It looks nice and its a good effort by author.

    Reply
  • How can I changed the number of panels dynamically ?

    Posted by Legacy on 05/26/1999 12:00am

    Originally posted by: L.Jin

    I have to change the panels' number of a CSplitterWnd object, would you please give me a sample about that ?

    Reply
Leave a Comment
  • Your email address will not be published. All fields are required.

Top White Papers and Webcasts

  • Live Event Date: August 20, 2014 @ 1:00 p.m. ET / 10:00 a.m. PT When you look at natural user interfaces as a developer, it isn't just fun and games. There are some very serious, real-world usage models of how things can help make the world a better place – things like Intel® RealSense™ technology. Check out this upcoming eSeminar and join the panel of experts, both from inside and outside of Intel, as they discuss how natural user interfaces will likely be getting adopted in a wide variety …

  • Managing your company's financials is the backbone of your business and is vital to the long-term health and viability of your company. To continue applying the necessary financial rigor to support rapid growth, the accounting department needs the right tools to most efficiently do their job. Read this white paper to understand the 10 essentials of a complete financial management system and how the right solution can help you keep up with the rapidly changing business world.

Most Popular Programming Stories

More for Developers

Latest Developer Headlines

RSS Feeds