|
// ChildFrm.cpp : implementation of the CChildFrame class
//
/////////////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include "resource.h"
#include "WelcomeKitTree.h"
#include "WebWin32SampleView.h"
#include "ChildFrm.h"
#include "WebWin32Lib.h"
void CChildFrame::OnFinalMessage(HWND /*hWnd*/)
{
delete this;
}
LRESULT CChildFrame::OnCreate(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& bHandled)
{
// Create the Splitter
m_splitter.Create( m_hWnd, rcDefault,_T(""),WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CLIPCHILDREN );
// Create treeview ( left ) and HTML View ( Rigth )
m_tree.Create( m_splitter, rcDefault, _T("RSF Tree View"),WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | TVS_HASLINES | TVS_LINESATROOT |TVS_HASBUTTONS |TVS_TRACKSELECT , WS_EX_CLIENTEDGE );
m_view.Create( m_splitter, rcDefault, NULL, WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CLIPCHILDREN, WS_EX_CLIENTEDGE );
// Set the client Window for this ChildFrame
m_hWndClient = m_splitter;
// Set Splitter Panes and Properties
m_splitter.SetSplitterPanes(m_tree, m_view);
CRect rcSplit( 0, 0, 100, 100 );
m_splitter.SetSplitterRect( &rcSplit );
m_splitter.SetSplitterPos( 25 );
CreateSimpleStatusBar();
// Set this child frame into ObjectLibrary state
CComQIPtr<IWebWin32Lib> pLib;
pLib = _Module.m_LibraryObject;
pLib->SetChildFrame( ( LONG ) this );
bHandled = FALSE;
return 1;
}
LRESULT CChildFrame::OnForwardMsg(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM lParam, BOOL& /*bHandled*/)
{
LPMSG pMsg = (LPMSG)lParam;
if(CMDIChildWindowImpl<CChildFrame>::PreTranslateMessage(pMsg))
return TRUE;
return m_view.PreTranslateMessage(pMsg);
}
LRESULT CChildFrame::OnSetFocus(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& bHandled)
{
// Set this child frame into ObjectLibrary state
CComQIPtr<IWebWin32Lib> pLib;
pLib = _Module.m_LibraryObject;
pLib->SetChildFrame( ( LONG ) this );
bHandled = FALSE;
return 0;
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.
A list of licenses authors might use can be found here
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.