diff options
author | David Cole <david.cole@kitware.com> | 2011-10-24 20:55:52 (GMT) |
---|---|---|
committer | David Cole <david.cole@kitware.com> | 2011-11-01 14:08:58 (GMT) |
commit | 36b0c432cf5804ec45367066e34f4c38165d5c09 (patch) | |
tree | 0c318628e7990a2e43b2f8a186f997b537a9f95f /Tests/MFC/mfc1/mfc1View.h | |
parent | 89742d73cc684a78586fad2497048d9329c1160e (diff) | |
download | CMake-36b0c432cf5804ec45367066e34f4c38165d5c09.zip CMake-36b0c432cf5804ec45367066e34f4c38165d5c09.tar.gz CMake-36b0c432cf5804ec45367066e34f4c38165d5c09.tar.bz2 |
Tests: Add the MFC test (#11213)
Build a simple, do-nothing VS 7.1 MFC wizard generated app
with CMake.
Build it two different ways via ExternalProject, one with
CMAKE_MFC_FLAG set to 1 for linking to MFC statically, and
one with CMAKE_MFC_FLAG set to 2 for linking to the shared
MFC dlls.
Validate that the install tree of the static build has only
one *.exe file in it and nothing else. Also validate that the
install tree of the shared library build has multiple files in
it (no less than 3) and that they are only of the expected types
*.exe, *.dll and *.manifest.
This commit does not address the issue reported in #11213,
it merely adds a test that may be used to show that the
bug report is valid. After this commit, the MFC test should
fail on any dashboard machines that have MSVC defined, but
cannot build an MFC app. We can then analyze that failure
data as input to solving the issue.
Diffstat (limited to 'Tests/MFC/mfc1/mfc1View.h')
-rw-r--r-- | Tests/MFC/mfc1/mfc1View.h | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/Tests/MFC/mfc1/mfc1View.h b/Tests/MFC/mfc1/mfc1View.h new file mode 100644 index 0000000..4244653 --- /dev/null +++ b/Tests/MFC/mfc1/mfc1View.h @@ -0,0 +1,48 @@ +// mfc1View.h : interface of the Cmfc1View class +// + + +#pragma once + + +class Cmfc1View : public CView +{ +protected: // create from serialization only + Cmfc1View(); + DECLARE_DYNCREATE(Cmfc1View) + +// Attributes +public: + Cmfc1Doc* GetDocument() const; + +// Operations +public: + +// Overrides + public: + virtual void OnDraw(CDC* pDC); // overridden to draw this view +virtual BOOL PreCreateWindow(CREATESTRUCT& cs); +protected: + virtual BOOL OnPreparePrinting(CPrintInfo* pInfo); + virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo); + virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo); + +// Implementation +public: + virtual ~Cmfc1View(); +#ifdef _DEBUG + virtual void AssertValid() const; + virtual void Dump(CDumpContext& dc) const; +#endif + +protected: + +// Generated message map functions +protected: + DECLARE_MESSAGE_MAP() +}; + +#ifndef _DEBUG // debug version in mfc1View.cpp +inline Cmfc1Doc* Cmfc1View::GetDocument() const + { return reinterpret_cast<Cmfc1Doc*>(m_pDocument); } +#endif |