sdiformviewdemoview.cpp

来自「Visual_C++[1].NET_Bible1 Visual_C++宝典书中」· C++ 代码 · 共 87 行

CPP
87
字号
// SDIFormViewDemoView.cpp : implementation of the CSDIFormViewDemoView class
//

#include "stdafx.h"
#include "SDIFormViewDemo.h"

#include "SDIFormViewDemoDoc.h"
#include "SDIFormViewDemoView.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#endif


// CSDIFormViewDemoView

class CWeirdStuff : public CWnd
{
public:
  void DoubleDutch(CWnd* pWndCtrl)
  { 
    ASSERT(::IsWindow(m_hWnd)); 
    ::SendMessage(m_hWnd, WM_NEXTDLGCTL, (WPARAM)pWndCtrl->m_hWnd, 1L); 
  }
};



IMPLEMENT_DYNCREATE(CSDIFormViewDemoView, CFormView)

BEGIN_MESSAGE_MAP(CSDIFormViewDemoView, CFormView)
END_MESSAGE_MAP()

// CSDIFormViewDemoView construction/destruction

CSDIFormViewDemoView::CSDIFormViewDemoView()
	: CFormView(CSDIFormViewDemoView::IDD)
{
	// TODO: add construction code here

}

CSDIFormViewDemoView::~CSDIFormViewDemoView()
{
}

void CSDIFormViewDemoView::DoDataExchange(CDataExchange* pDX)
{
	CFormView::DoDataExchange(pDX);
}

BOOL CSDIFormViewDemoView::PreCreateWindow(CREATESTRUCT& cs)
{
	return CFormView::PreCreateWindow(cs);
}

void CSDIFormViewDemoView::OnInitialUpdate()
{
	CFormView::OnInitialUpdate();
	GetParentFrame()->RecalcLayout();
	ResizeParentToFit();
}


// CSDIFormViewDemoView diagnostics

#ifdef _DEBUG
void CSDIFormViewDemoView::AssertValid() const
{
	CFormView::AssertValid();
}

void CSDIFormViewDemoView::Dump(CDumpContext& dc) const
{
	CFormView::Dump(dc);
}

CSDIFormViewDemoDoc* CSDIFormViewDemoView::GetDocument() const // non-debug version is inline
{
	ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CSDIFormViewDemoDoc)));
	return (CSDIFormViewDemoDoc*)m_pDocument;
}
#endif //_DEBUG


// CSDIFormViewDemoView message handlers

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?