?? titleview.cpp
字號(hào):
// TitleView.cpp : implementation file
//
#include "stdafx.h"
#include "pitc.h"
#include "TitleView.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
#define IDC_TITLE 8000
/////////////////////////////////////////////////////////////////////////////
// CTitleView
IMPLEMENT_DYNCREATE(CTitleView, CView)
CTitleView::CTitleView()
{
}
CTitleView::~CTitleView()
{
}
BEGIN_MESSAGE_MAP(CTitleView, CView)
//{{AFX_MSG_MAP(CTitleView)
ON_WM_CREATE()
ON_WM_SIZE()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CTitleView drawing
void CTitleView::OnDraw(CDC* pDC)
{
CDocument* pDoc = GetDocument();
// TODO: add draw code here
}
/////////////////////////////////////////////////////////////////////////////
// CTitleView diagnostics
#ifdef _DEBUG
void CTitleView::AssertValid() const
{
CView::AssertValid();
}
void CTitleView::Dump(CDumpContext& dc) const
{
CView::Dump(dc);
}
#endif //_DEBUG
/////////////////////////////////////////////////////////////////////////////
// CTitleView message handlers
int CTitleView::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
if (CView::OnCreate(lpCreateStruct) == -1)
return -1;
// TODO: Add your specialized creation code here
if(!m_wndTitle.Create("Title",WS_VISIBLE|WS_CHILD|WS_DLGFRAME |SS_CENTER ,CRect(0,0,0,0),this,IDC_TITLE))
{
AfxMessageBox("創(chuàng)建Title控件時(shí)出錯(cuò)!");
return -1;
}
m_wndTitle.SetWindowText("List的標(biāo)題");
return 0;
}
void CTitleView::OnSize(UINT nType, int cx, int cy)
{
CView::OnSize(nType, cx, cy);
// TODO: Add your message handler code here
if(m_wndTitle)
{
m_wndTitle.MoveWindow(CRect(0,0,cx,22),TRUE);
}
}
void CTitleView::SetViewTitle(CString strTitle)
{
if(m_wndTitle)
m_wndTitle.SetWindowText(strTitle);
}
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -