📄 itemframewnd.cpp
字号:
// ItemFrameWnd.cpp : implementation file
//
#include "stdafx.h"
#include "MainFrm.h"
#include "BeeReader.h"
#include "ItemFrameWnd.h"
#include "BeeReaderView.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CItemFrameWnd
IMPLEMENT_DYNCREATE(CItemFrameWnd,CXTFrameWnd)
CItemFrameWnd::CItemFrameWnd()
{
m_bCreate = FALSE;
}
CItemFrameWnd::~CItemFrameWnd()
{
}
BEGIN_MESSAGE_MAP(CItemFrameWnd, CXTFrameWnd)
//{{AFX_MSG_MAP(CItemFrameWnd)
ON_WM_CREATE()
ON_WM_SIZE()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CItemFrameWnd message handlers
BOOL CItemFrameWnd::OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext)
{
// TODO: Add your specialized code here and/or call the base class
CBeeReaderView *pview;
// Create a context.
CCreateContext context;
pContext = &context;
// Assign custom view.
pContext->m_pNewViewClass = RUNTIME_CLASS(CBeeReaderView);
// Create the view.
pview = (CBeeReaderView *) CreateView(pContext, AFX_IDW_PANE_FIRST);
if (pview == NULL)
return FALSE;
// Notify the view.
//pview->SendMessage(WM_INITIALUPDATE);
SetActiveView(pview, FALSE);
return TRUE;
}
int CItemFrameWnd::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
if (CXTFrameWnd::OnCreate(lpCreateStruct) == -1)
return -1;
// TODO: Add your specialized creation code here
/*
if (!m_wndToolBar.CreateEx(this, TBSTYLE_FLAT, WS_CHILD | WS_VISIBLE | CBRS_TOP
|CBRS_GRIPPER|CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC,CRect(0,0,0,0),IDC_TOOLBAR3) ||
!m_wndToolBar.LoadToolBar(IDR_TOOLBAR_LIST))
{
TRACE0("Failed to create toolbar\n");
return -1; // fail to create
}
m_wndToolBar.SetHeight(26);
if (!m_wndComboURL.Create(WS_CHILD|WS_VISIBLE|CBS_DROPDOWNLIST|WS_VSCROLL,
CRect(5,2,120,22), &m_wndToolBar, IDR_TB_ITEM_FILTER))
{
TRACE0("Failed to create combo box.\n");
return -1; // fail to create
}
m_wndComboURL.AddString(_T("浏览所有项") );
m_wndComboURL.AddString(_T("仅浏览当天项"));
m_wndComboURL.AddString(_T("仅浏览前二天项"));
m_wndComboURL.AddString(_T("仅浏览前三天项"));
m_wndComboURL.AddString(_T("仅浏览当周项"));
m_wndComboURL.AddString(_T("仅浏览当月项"));
m_wndComboURL.SetCurSel(0);
m_wndToolBar.InsertControl(&m_wndComboURL);
*/
m_bCreate = TRUE;
return 0;
}
void CItemFrameWnd::OnSize(UINT nType, int cx, int cy)
{
CXTFrameWnd::OnSize(nType, cx, cy);
// TODO: Add your message handler code here
/*
if( !m_bCreate ) return;
CRect rect;
m_wndToolBar.GetClientRect(&rect);
m_wndComboURL.MoveWindow(5,2,120,180);
*/
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -