?? diagview.cpp
字號(hào):
// DiagView.cpp : implementation file
//
#include "stdafx.h"
#include "CCAMS.h"
#include "DiagView.h"
#include "MainFrm.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CDiagView
IMPLEMENT_DYNCREATE(CDiagView, CFormView)
CDiagView::CDiagView()
: CFormView(CDiagView::IDD)
{
//{{AFX_DATA_INIT(CDiagView)
//}}AFX_DATA_INIT
}
CDiagView::~CDiagView()
{
}
void CDiagView::DoDataExchange(CDataExchange* pDX)
{
CFormView::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CDiagView)
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CDiagView, CFormView)
//{{AFX_MSG_MAP(CDiagView)
ON_WM_SIZE()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CDiagView diagnostics
#ifdef _DEBUG
void CDiagView::AssertValid() const
{
CFormView::AssertValid();
}
void CDiagView::Dump(CDumpContext& dc) const
{
CFormView::Dump(dc);
}
CCCAMSDoc* CDiagView::GetDocument() // non-debug version is inline
{
ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CCCAMSDoc)));
return (CCCAMSDoc*)m_pDocument;
}
#endif //_DEBUG
/////////////////////////////////////////////////////////////////////////////
// CDiagView message handlers
void CDiagView::OnInitialUpdate()
{
// CFormView::OnInitialUpdate();
// TODO: Add your specialized code here and/or call the base class
CRect Rect;
GetDlgItem(IDC_CLPLOT)->GetClientRect(&Rect);
m_Plot.Create(WS_CHILD|WS_VISIBLE, Rect, GetDlgItem(IDC_CLPLOT), 12000);
m_Plot.SetSerie(0, PS_SOLID, RGB(255,0,0), 0.0, 900.0, "Chenhuan");
m_Plot.SetLegend(0, PS_SOLID, RGB(255,0,0), "Temperature");
m_Plot.m_bAutoScrollX = TRUE;
// MessageBox("CDiagView::OnInitialUpdate()");
// m_spinRefTime.SetRange(0, 30);
// m_spinRefTime.SetBuddy(pEdit);
}
void CDiagView::OnSize(UINT nType, int cx, int cy)
{
// CFormView::OnSize(nType, cx, cy);
// TODO: Add your message handler code here
this->ShowWindow(SW_MAXIMIZE);
// 列表列表控件必須是第一個(gè)控件
CWnd *pchild = this->GetWindow(GW_CHILD); //Identifies the CWnd first child window
if (pchild != NULL)
{
CRect rect;
this->GetClientRect(&rect);
pchild->ScreenToClient(&rect);
pchild->SetWindowPos(NULL, 0, 0, rect.Width(), rect.Height(),
SWP_NOZORDER | SWP_NOACTIVATE);
}
}
void CDiagView::OnUpdate(CView* pSender, LPARAM lHint, CObject* pHint)
{
// TODO: Add your specialized code here and/or call the base class
CMainFrame *pWnd = (CMainFrame *)AfxGetMainWnd( );
CString strContent;
pWnd->m_wndCategory.GetWindowText(strContent);
// AfxMessageBox(strContent);
}
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -