?? childfrm.cpp
字號:
// ChildFrm.cpp : CChildFrame 類的實現
//
#include "stdafx.h"
#include "VisDraw.h"
#include "ChildFrm.h"
#include ".\childfrm.h"
#include "RightView.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#endif
// CChildFrame
IMPLEMENT_DYNCREATE(CChildFrame, CMDIChildWnd)
BEGIN_MESSAGE_MAP(CChildFrame, CMDIChildWnd)
// ON_COMMAND(ID_ZHISHIKU, &CChildFrame::OnZhishiku)
END_MESSAGE_MAP()
// CChildFrame 構造/析構
CChildFrame::CChildFrame()
{
// TODO: 在此添加成員初始化代碼
}
CChildFrame::~CChildFrame()
{
}
BOOL CChildFrame::PreCreateWindow(CREATESTRUCT& cs)
{
// TODO: 在此處通過修改 CREATESTRUCT cs 來修改窗口類或樣式
/*if( !CMDIChildWnd::PreCreateWindow(cs) )
return FALSE;
return TRUE;*/
cs.style = WS_CHILD | WS_VISIBLE | FWS_ADDTOTITLE | WS_OVERLAPPEDWINDOW | WS_MAXIMIZE;
return CMDIChildWnd::PreCreateWindow(cs);
}
// CChildFrame 診斷
#ifdef _DEBUG
void CChildFrame::AssertValid() const
{
CMDIChildWnd::AssertValid();
}
void CChildFrame::Dump(CDumpContext& dc) const
{
CMDIChildWnd::Dump(dc);
}
#endif //_DEBUG
// CChildFrame 消息處理程序
BOOL CChildFrame::OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext)
{
// TODO: 在此添加專用代碼和/或調用基類
CWnd* pParent = GetParent();
ASSERT_VALID(pParent);
CRect rectClient,rc;
//pParent->UpdateWindow(); // always update before tracking
// clip cursor to parent window
pParent->GetWindowRect(&rectClient);
pParent->ClientToScreen(&rectClient);
GetClientRect(&rc);
int widlen=rectClient.right-320;
int hightlen=rectClient.bottom-280;
if (!m_wndSplitter.CreateStatic(this, 1, 2,WS_CHILD | WS_VISIBLE))//|SPLS_DYNAMIC_SPLIT
{
TRACE0("Failed to CreateStaticSplitter\n");
return FALSE;
}
// add the first splitter pane - the default view in column 0
if (!m_wndSplitter.CreateView(0, 0,
pContext->m_pNewViewClass, CSize(widlen, 45), pContext))
//pContext->m_pNewViewClass, CSize(500, 50), pContext))
{
TRACE0("Failed to create first pane\n");
return FALSE;
}
// add the second splitter pane - an input view in column 1
if (!m_wndSplitter.CreateView(0, 1,
RUNTIME_CLASS(CRightView), CSize(0, 0), pContext))
{
TRACE0("Failed to create second pane\n");
return FALSE;
}
// activate the input view
SetActiveView((CView*)m_wndSplitter.GetPane(0,0));
return TRUE;
/*return CMDIChildWnd::OnCreateClient(lpcs, pContext);*/
}
//void CChildFrame::OnZhishiku()
//{
// // TODO: 在此添加命令處理程序代碼
// CZhishiKuDlg Zhishiku;
// Zhishiku.DoModal();
//
//
//}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -