📄 mycontrolbar.cpp
字号:
// mybar.cpp : implementation file
//
#include "stdafx.h"
#include "CQuakeDemo.h"
#include "mycontrolbar.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CMyControlBar
CMyControlBar::CMyControlBar()
{
m_pInterface = NULL;
m_szMin = CSize(50, 80);
m_szHorz = CSize(200, 80);
m_szVert = CSize(200, 80);
m_szFloat = CSize(200, 80);
}
CMyControlBar::~CMyControlBar()
{
}
BEGIN_MESSAGE_MAP(CMyControlBar, baseCMyBar)
//{{AFX_MSG_MAP(CMyControlBar)
ON_WM_CREATE()
ON_WM_SIZE()
ON_WM_GETMINMAXINFO()
//}}AFX_MSG_MAP
ON_MESSAGE(WM_INIINTERFACE,OnIniInterface)
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CMyControlBar message handlers
int CMyControlBar::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
if (baseCMyBar::OnCreate(lpCreateStruct) == -1)
return -1;
if(!m_dlgControl.Create(IDD_DLG_RATESETTINGS,this))
return -1;
m_dlgControl.ShowWindow(SW_SHOW);
return 0;
}
void CMyControlBar::OnUpdateCmdUI(CFrameWnd* pTarget, BOOL bDisableIfNoHndler)
{
baseCMyBar::OnUpdateCmdUI(pTarget, bDisableIfNoHndler);
UpdateDialogControls(pTarget, bDisableIfNoHndler);
}
void CMyControlBar::OnSize(UINT nType, int cx, int cy)
{
baseCMyBar::OnSize(nType, cx, cy);
// TODO: Add your message handler code here
CRect rc;
GetClientRect(rc);
m_dlgControl.MoveWindow(rc);
}
void CMyControlBar::OnGetMinMaxInfo(MINMAXINFO FAR* lpMMI)
{
lpMMI->ptMaxTrackSize=CPoint(400,400);
lpMMI->ptMinTrackSize=CPoint(400,400);
baseCMyBar::OnGetMinMaxInfo(lpMMI);
}
LRESULT CMyControlBar::OnIniInterface(LPARAM lParam, WPARAM wParam)
{
m_pInterface = (CControlInterface*)lParam;
m_dlgControl.m_pInterface = m_pInterface;
m_pInterface->SetControlPointer(&m_dlgControl);
return NULL;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -