From 36b0c432cf5804ec45367066e34f4c38165d5c09 Mon Sep 17 00:00:00 2001 From: David Cole Date: Mon, 24 Oct 2011 16:55:52 -0400 Subject: [PATCH] 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. --- Tests/CMakeLists.txt | 21 ++ Tests/MFC/CMakeLists.txt | 50 ++++ Tests/MFC/CMakeLists.txt.in | 50 ++++ Tests/MFC/ValidateBuild.cmake.in | 60 +++++ Tests/MFC/mfc1/.gitattributes | 6 + Tests/MFC/mfc1/ChildFrm.cpp | 59 +++++ Tests/MFC/mfc1/ChildFrm.h | 34 +++ Tests/MFC/mfc1/MainFrm.cpp | 98 ++++++++ Tests/MFC/mfc1/MainFrm.h | 38 +++ Tests/MFC/mfc1/ReadMe.txt | 135 +++++++++++ Tests/MFC/mfc1/Resource.h | 20 ++ Tests/MFC/mfc1/mfc1.cpp | 144 ++++++++++++ Tests/MFC/mfc1/mfc1.h | 31 +++ Tests/MFC/mfc1/mfc1.rc | 387 +++++++++++++++++++++++++++++++ Tests/MFC/mfc1/mfc1.reg | 13 ++ Tests/MFC/mfc1/mfc1.sln | 21 ++ Tests/MFC/mfc1/mfc1.vcproj | 216 +++++++++++++++++ Tests/MFC/mfc1/mfc1Doc.cpp | 78 +++++++ Tests/MFC/mfc1/mfc1Doc.h | 37 +++ Tests/MFC/mfc1/mfc1View.cpp | 99 ++++++++ Tests/MFC/mfc1/mfc1View.h | 48 ++++ Tests/MFC/mfc1/res/Toolbar.bmp | Bin 0 -> 1078 bytes Tests/MFC/mfc1/res/mfc1.ico | Bin 0 -> 21630 bytes Tests/MFC/mfc1/res/mfc1.manifest | 22 ++ Tests/MFC/mfc1/res/mfc1.rc2 | 13 ++ Tests/MFC/mfc1/res/mfc1Doc.ico | Bin 0 -> 1078 bytes Tests/MFC/mfc1/stdafx.cpp | 5 + Tests/MFC/mfc1/stdafx.h | 41 ++++ 28 files changed, 1726 insertions(+) create mode 100644 Tests/MFC/CMakeLists.txt create mode 100644 Tests/MFC/CMakeLists.txt.in create mode 100644 Tests/MFC/ValidateBuild.cmake.in create mode 100644 Tests/MFC/mfc1/.gitattributes create mode 100644 Tests/MFC/mfc1/ChildFrm.cpp create mode 100644 Tests/MFC/mfc1/ChildFrm.h create mode 100644 Tests/MFC/mfc1/MainFrm.cpp create mode 100644 Tests/MFC/mfc1/MainFrm.h create mode 100644 Tests/MFC/mfc1/ReadMe.txt create mode 100644 Tests/MFC/mfc1/Resource.h create mode 100644 Tests/MFC/mfc1/mfc1.cpp create mode 100644 Tests/MFC/mfc1/mfc1.h create mode 100644 Tests/MFC/mfc1/mfc1.rc create mode 100644 Tests/MFC/mfc1/mfc1.reg create mode 100644 Tests/MFC/mfc1/mfc1.sln create mode 100644 Tests/MFC/mfc1/mfc1.vcproj create mode 100644 Tests/MFC/mfc1/mfc1Doc.cpp create mode 100644 Tests/MFC/mfc1/mfc1Doc.h create mode 100644 Tests/MFC/mfc1/mfc1View.cpp create mode 100644 Tests/MFC/mfc1/mfc1View.h create mode 100644 Tests/MFC/mfc1/res/Toolbar.bmp create mode 100644 Tests/MFC/mfc1/res/mfc1.ico create mode 100644 Tests/MFC/mfc1/res/mfc1.manifest create mode 100644 Tests/MFC/mfc1/res/mfc1.rc2 create mode 100644 Tests/MFC/mfc1/res/mfc1Doc.ico create mode 100644 Tests/MFC/mfc1/stdafx.cpp create mode 100644 Tests/MFC/mfc1/stdafx.h diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index 78db39d6f..f400f6d61 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -1206,6 +1206,27 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=master -P ${CMake_SOURCE_DIR}/Utilities/ LIST(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/MakeClean") ENDIF("${CMAKE_TEST_GENERATOR}" MATCHES "Makefile") + if(NOT DEFINED CTEST_RUN_MFC) + set(CTEST_RUN_MFC OFF) + if(MSVC) + set(CTEST_RUN_MFC ON) + endif() + endif() + + if(CTEST_RUN_MFC) + add_test(MFC ${CMAKE_CTEST_COMMAND} + --build-and-test + "${CMake_SOURCE_DIR}/Tests/MFC" + "${CMake_BINARY_DIR}/Tests/MFC" + --build-two-config + --build-generator ${CMAKE_TEST_GENERATOR} + --build-project mfc_driver + --build-makeprogram ${CMAKE_TEST_MAKEPROGRAM} + --test-command ${CMAKE_CTEST_COMMAND} + -C \${CTEST_CONFIGURATION_TYPE} -VV) + list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/MFC") + endif() + IF(${CMAKE_TEST_GENERATOR} MATCHES "Visual Studio") ADD_TEST(VSExternalInclude ${CMAKE_CTEST_COMMAND} --build-and-test diff --git a/Tests/MFC/CMakeLists.txt b/Tests/MFC/CMakeLists.txt new file mode 100644 index 000000000..ea5c41d6e --- /dev/null +++ b/Tests/MFC/CMakeLists.txt @@ -0,0 +1,50 @@ +cmake_minimum_required(VERSION 2.8) +project(mfc_driver) + +include(CTest) +include(ExternalProject) + + +set(CMAKE_MFC_FLAG_VALUE "2") +configure_file( + ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt.in + ${CMAKE_CURRENT_BINARY_DIR}/CMakeLists.SharedMfcDll.txt + @ONLY + ) + +ExternalProject_Add(mfcShared + URL ${CMAKE_CURRENT_SOURCE_DIR}/mfc1 + PATCH_COMMAND ${CMAKE_COMMAND} -E copy + ${CMAKE_CURRENT_BINARY_DIR}/CMakeLists.SharedMfcDll.txt + /CMakeLists.txt + CMAKE_ARGS -DCMAKE_INSTALL_PREFIX= + ) + + +set(CMAKE_MFC_FLAG_VALUE "1") +configure_file( + ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt.in + ${CMAKE_CURRENT_BINARY_DIR}/CMakeLists.StaticMfcLib.txt + @ONLY + ) + +ExternalProject_Add(mfcStatic + URL ${CMAKE_CURRENT_SOURCE_DIR}/mfc1 + PATCH_COMMAND ${CMAKE_COMMAND} -E copy + ${CMAKE_CURRENT_BINARY_DIR}/CMakeLists.StaticMfcLib.txt + /CMakeLists.txt + CMAKE_ARGS -DCMAKE_INSTALL_PREFIX= + ) + + +set(binary_dir "${CMAKE_CURRENT_BINARY_DIR}") +configure_file( + ${CMAKE_CURRENT_SOURCE_DIR}/ValidateBuild.cmake.in + ${CMAKE_CURRENT_BINARY_DIR}/ValidateBuild.cmake + @ONLY + ) +add_test( + NAME validate + COMMAND ${CMAKE_COMMAND} + -P "${CMAKE_CURRENT_BINARY_DIR}/ValidateBuild.cmake" + ) diff --git a/Tests/MFC/CMakeLists.txt.in b/Tests/MFC/CMakeLists.txt.in new file mode 100644 index 000000000..06ba8b3f8 --- /dev/null +++ b/Tests/MFC/CMakeLists.txt.in @@ -0,0 +1,50 @@ +cmake_minimum_required(VERSION 2.8) +project(mfc1) + +macro(replace_flags var these those) + if("${${var}}" MATCHES "${these}") + string(REGEX REPLACE "${these}" "${those}" ${var} "${${var}}") + #message(STATUS "info: ${var} changed to '${${var}}'") + endif() +endmacro() + +macro(msvc_link_to_static_crt) + if(MSVC) + foreach(lang C CXX) + foreach(suffix "" _DEBUG _MINSIZEREL _RELEASE _RELWITHDEBINFO) + replace_flags("CMAKE_${lang}_FLAGS${suffix}" "/MD" "/MT") + endforeach() + endforeach() + endif() +endmacro() + +set(files + ChildFrm.cpp + ChildFrm.h + MainFrm.cpp + MainFrm.h + mfc1.cpp + mfc1.h + mfc1.rc + mfc1Doc.cpp + mfc1Doc.h + mfc1View.cpp + mfc1View.h + Resource.h + stdafx.cpp + stdafx.h +) + +set(CMAKE_MFC_FLAG "@CMAKE_MFC_FLAG_VALUE@") + +if("${CMAKE_MFC_FLAG}" STREQUAL "1") + msvc_link_to_static_crt() +endif() + +add_executable(mfc1 WIN32 ${files}) +install(TARGETS mfc1 DESTINATION bin) + +if("${CMAKE_MFC_FLAG}" STREQUAL "2") + set(CMAKE_INSTALL_MFC_LIBRARIES ON) + include(InstallRequiredSystemLibraries) +endif() diff --git a/Tests/MFC/ValidateBuild.cmake.in b/Tests/MFC/ValidateBuild.cmake.in new file mode 100644 index 000000000..68de54927 --- /dev/null +++ b/Tests/MFC/ValidateBuild.cmake.in @@ -0,0 +1,60 @@ +# +# This code validates that the install trees of the shared and static builds +# of "mfc1" have the expected contents: +# +set(binary_dir "@binary_dir@") +message("binary_dir='${binary_dir}'") + +# There should be exactly one file in the static install tree "bin" directory +# and it should be named "mfc1.exe" +# +message(STATUS "===== mfcStatic install tree =====") +file(GLOB_RECURSE files "${binary_dir}/mfcStatic-prefix/bin/*.*") +message(STATUS "mfcStatic files='${files}'") +list(LENGTH files len) +if(NOT len EQUAL 1) + message(FATAL_ERROR + "len='${len}' is not '1' (count of static 'bin' files)") +endif() +get_filename_component(name "${files}" NAME) +string(TOLOWER "${name}" name) +if(NOT "${name}" STREQUAL "mfc1.exe") + message(FATAL_ERROR "unexpected mfcStatic file name '${name}'") +endif() + +# There should be at least 3 files in the shared install tree "bin" +# directory: mfc1.exe, the main MFC dll and the C runtime dll. With more +# recent versions of VS, there will also be an MFC language dll and a +# manifest file. +# +message(STATUS "===== mfcShared install tree =====") +file(GLOB_RECURSE files "${binary_dir}/mfcShared-prefix/bin/*.*") +message(STATUS "mfcShared files='${files}'") +list(LENGTH files len) +if(len LESS 3) + message(FATAL_ERROR + "len='${len}' is less than '3' (count of shared 'bin' files)") +endif() +foreach(f ${files}) + message(STATUS "file '${f}'") + get_filename_component(ext "${f}" EXT) + string(TOLOWER "${ext}" ext) + + if("${ext}" MATCHES "\\.exe$") + message(STATUS " exe file") + get_filename_component(name "${f}" NAME) + string(TOLOWER "${name}" name) + if(NOT "${name}" STREQUAL "mfc1.exe") + message(FATAL_ERROR "unexpected mfcShared .exe file name '${name}'") + endif() + elseif("${ext}" MATCHES "\\.dll$") + message(STATUS " dll file") + elseif("${ext}" MATCHES "\\.manifest$") + message(STATUS " manifest file") + else() + message(STATUS " unknown file") + message(FATAL_ERROR "unexpected mfcShared ${ext} file name '${f}'") + endif() +endforeach() + +message(STATUS "All mfc1 build validation tests pass.") diff --git a/Tests/MFC/mfc1/.gitattributes b/Tests/MFC/mfc1/.gitattributes new file mode 100644 index 000000000..59be5dcfb --- /dev/null +++ b/Tests/MFC/mfc1/.gitattributes @@ -0,0 +1,6 @@ +.gitattributes export-ignore + +*.sln -crlf +*.vcproj -crlf + +* -whitespace diff --git a/Tests/MFC/mfc1/ChildFrm.cpp b/Tests/MFC/mfc1/ChildFrm.cpp new file mode 100644 index 000000000..b04c4f231 --- /dev/null +++ b/Tests/MFC/mfc1/ChildFrm.cpp @@ -0,0 +1,59 @@ +// ChildFrm.cpp : implementation of the CChildFrame class +// +#include "stdafx.h" +#include "mfc1.h" + +#include "ChildFrm.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#endif + + +// CChildFrame + +IMPLEMENT_DYNCREATE(CChildFrame, CMDIChildWnd) + +BEGIN_MESSAGE_MAP(CChildFrame, CMDIChildWnd) +END_MESSAGE_MAP() + + +// CChildFrame construction/destruction + +CChildFrame::CChildFrame() +{ + // TODO: add member initialization code here +} + +CChildFrame::~CChildFrame() +{ +} + + +BOOL CChildFrame::PreCreateWindow(CREATESTRUCT& cs) +{ + // TODO: Modify the Window class or styles here by modifying the CREATESTRUCT cs + if( !CMDIChildWnd::PreCreateWindow(cs) ) + return FALSE; + + return TRUE; +} + + +// CChildFrame diagnostics + +#ifdef _DEBUG +void CChildFrame::AssertValid() const +{ + CMDIChildWnd::AssertValid(); +} + +void CChildFrame::Dump(CDumpContext& dc) const +{ + CMDIChildWnd::Dump(dc); +} + +#endif //_DEBUG + + +// CChildFrame message handlers diff --git a/Tests/MFC/mfc1/ChildFrm.h b/Tests/MFC/mfc1/ChildFrm.h new file mode 100644 index 000000000..34b80f126 --- /dev/null +++ b/Tests/MFC/mfc1/ChildFrm.h @@ -0,0 +1,34 @@ +// ChildFrm.h : interface of the CChildFrame class +// + + +#pragma once + + +class CChildFrame : public CMDIChildWnd +{ + DECLARE_DYNCREATE(CChildFrame) +public: + CChildFrame(); + +// Attributes +public: + +// Operations +public: + +// Overrides + virtual BOOL PreCreateWindow(CREATESTRUCT& cs); + +// Implementation +public: + virtual ~CChildFrame(); +#ifdef _DEBUG + virtual void AssertValid() const; + virtual void Dump(CDumpContext& dc) const; +#endif + +// Generated message map functions +protected: + DECLARE_MESSAGE_MAP() +}; diff --git a/Tests/MFC/mfc1/MainFrm.cpp b/Tests/MFC/mfc1/MainFrm.cpp new file mode 100644 index 000000000..44554bf4c --- /dev/null +++ b/Tests/MFC/mfc1/MainFrm.cpp @@ -0,0 +1,98 @@ +// MainFrm.cpp : implementation of the CMainFrame class +// + +#include "stdafx.h" +#include "mfc1.h" + +#include "MainFrm.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#endif + + +// CMainFrame + +IMPLEMENT_DYNAMIC(CMainFrame, CMDIFrameWnd) + +BEGIN_MESSAGE_MAP(CMainFrame, CMDIFrameWnd) + ON_WM_CREATE() +END_MESSAGE_MAP() + +static UINT indicators[] = +{ + ID_SEPARATOR, // status line indicator + ID_INDICATOR_CAPS, + ID_INDICATOR_NUM, + ID_INDICATOR_SCRL, +}; + + +// CMainFrame construction/destruction + +CMainFrame::CMainFrame() +{ + // TODO: add member initialization code here +} + +CMainFrame::~CMainFrame() +{ +} + + +int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct) +{ + if (CMDIFrameWnd::OnCreate(lpCreateStruct) == -1) + return -1; + + if (!m_wndToolBar.CreateEx(this, TBSTYLE_FLAT, WS_CHILD | WS_VISIBLE | CBRS_TOP + | CBRS_GRIPPER | CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC) || + !m_wndToolBar.LoadToolBar(IDR_MAINFRAME)) + { + TRACE0("Failed to create toolbar\n"); + return -1; // fail to create + } + + if (!m_wndStatusBar.Create(this) || + !m_wndStatusBar.SetIndicators(indicators, + sizeof(indicators)/sizeof(UINT))) + { + TRACE0("Failed to create status bar\n"); + return -1; // fail to create + } + // TODO: Delete these three lines if you don't want the toolbar to be dockable + m_wndToolBar.EnableDocking(CBRS_ALIGN_ANY); + EnableDocking(CBRS_ALIGN_ANY); + DockControlBar(&m_wndToolBar); + + return 0; +} + +BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs) +{ + if( !CMDIFrameWnd::PreCreateWindow(cs) ) + return FALSE; + // TODO: Modify the Window class or styles here by modifying + // the CREATESTRUCT cs + + return TRUE; +} + + +// CMainFrame diagnostics + +#ifdef _DEBUG +void CMainFrame::AssertValid() const +{ + CMDIFrameWnd::AssertValid(); +} + +void CMainFrame::Dump(CDumpContext& dc) const +{ + CMDIFrameWnd::Dump(dc); +} + +#endif //_DEBUG + + +// CMainFrame message handlers diff --git a/Tests/MFC/mfc1/MainFrm.h b/Tests/MFC/mfc1/MainFrm.h new file mode 100644 index 000000000..1039ac5ee --- /dev/null +++ b/Tests/MFC/mfc1/MainFrm.h @@ -0,0 +1,38 @@ +// MainFrm.h : interface of the CMainFrame class +// + + +#pragma once +class CMainFrame : public CMDIFrameWnd +{ + DECLARE_DYNAMIC(CMainFrame) +public: + CMainFrame(); + +// Attributes +public: + +// Operations +public: + +// Overrides +public: + virtual BOOL PreCreateWindow(CREATESTRUCT& cs); + +// Implementation +public: + virtual ~CMainFrame(); +#ifdef _DEBUG + virtual void AssertValid() const; + virtual void Dump(CDumpContext& dc) const; +#endif + +protected: // control bar embedded members + CStatusBar m_wndStatusBar; + CToolBar m_wndToolBar; + +// Generated message map functions +protected: + afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct); + DECLARE_MESSAGE_MAP() +}; diff --git a/Tests/MFC/mfc1/ReadMe.txt b/Tests/MFC/mfc1/ReadMe.txt new file mode 100644 index 000000000..d84608e71 --- /dev/null +++ b/Tests/MFC/mfc1/ReadMe.txt @@ -0,0 +1,135 @@ +================================================================================ + MICROSOFT FOUNDATION CLASS LIBRARY : mfc1 Project Overview +=============================================================================== + +The application wizard has created this mfc1 application for +you. This application not only demonstrates the basics of using the Microsoft +Foundation Classes but is also a starting point for writing your application. + +This file contains a summary of what you will find in each of the files that +make up your mfc1 application. + +mfc1.vcproj + This is the main project file for VC++ projects generated using an application wizard. + It contains information about the version of Visual C++ that generated the file, and + information about the platforms, configurations, and project features selected with the + application wizard. + +mfc1.h + This is the main header file for the application. It includes other + project specific headers (including Resource.h) and declares the + Cmfc1App application class. + +mfc1.cpp + This is the main application source file that contains the application + class Cmfc1App. + +mfc1.rc + This is a listing of all of the Microsoft Windows resources that the + program uses. It includes the icons, bitmaps, and cursors that are stored + in the RES subdirectory. This file can be directly edited in Microsoft + Visual C++. Your project resources are in 1033. + +res\mfc1.ico + This is an icon file, which is used as the application's icon. This + icon is included by the main resource file mfc1.rc. + +res\mfc1.rc2 + This file contains resources that are not edited by Microsoft + Visual C++. You should place all resources not editable by + the resource editor in this file. +mfc1.reg + This is an example .reg file that shows you the kind of registration + settings the framework will set for you. You can use this as a .reg + file to go along with your application or just delete it and rely + on the default RegisterShellFileTypes registration. +///////////////////////////////////////////////////////////////////////////// + +For the main frame window: + The project includes a standard MFC interface. +MainFrm.h, MainFrm.cpp + These files contain the frame class CMainFrame, which is derived from + CMDIFrameWnd and controls all MDI frame features. +res\Toolbar.bmp + This bitmap file is used to create tiled images for the toolbar. + The initial toolbar and status bar are constructed in the CMainFrame + class. Edit this toolbar bitmap using the resource editor, and + update the IDR_MAINFRAME TOOLBAR array in mfc1.rc to add + toolbar buttons. +///////////////////////////////////////////////////////////////////////////// + +For the child frame window: + +ChildFrm.h, ChildFrm.cpp + These files define and implement the CChildFrame class, which + supports the child windows in an MDI application. + +///////////////////////////////////////////////////////////////////////////// + +The application wizard creates one document type and one view: + +mfc1Doc.h, mfc1Doc.cpp - the document + These files contain your Cmfc1Doc class. Edit these files to + add your special document data and to implement file saving and loading + (via Cmfc1Doc::Serialize). + The Document will have the following strings: + File extension: mf1 + File type ID: mfc1.Document + Main frame caption: mfc1 + Doc type name: mfc1 + Filter name: mfc1 Files (*.mf1) + File new short name: mfc1 + File type long name: mfc1.Document +mfc1View.h, mfc1View.cpp - the view of the document + These files contain your Cmfc1View class. + Cmfc1View objects are used to view Cmfc1Doc objects. +res\mfc1Doc.ico + This is an icon file, which is used as the icon for MDI child windows + for the Cmfc1Doc class. This icon is included by the main + resource file mfc1.rc. +///////////////////////////////////////////////////////////////////////////// + +Other Features: + +ActiveX Controls + The application includes support to use ActiveX controls. + +Printing and Print Preview support + The application wizard has generated code to handle the print, print setup, and print preview + commands by calling member functions in the CView class from the MFC library. +///////////////////////////////////////////////////////////////////////////// + +Other standard files: + +StdAfx.h, StdAfx.cpp + These files are used to build a precompiled header (PCH) file + named mfc1.pch and a precompiled types file named StdAfx.obj. + +Resource.h + This is the standard header file, which defines new resource IDs. + Microsoft Visual C++ reads and updates this file. + +mfc1.manifest + Application manifest files are used by Windows XP to describe an applications + dependency on specific versions of Side-by-Side assemblies. The loader uses this + information to load the appropriate assembly from the assembly cache or private + from the application. The Application manifest maybe included for redistribution + as an external .manifest file that is installed in the same folder as the application + executable or it may be included in the executable in the form of a resource. +///////////////////////////////////////////////////////////////////////////// + +Other notes: + +The application wizard uses "TODO:" to indicate parts of the source code you +should add to or customize. + +If your application uses MFC in a shared DLL, and your application is in a +language other than the operating system's current language, you will need +to copy the corresponding localized resources MFC70XXX.DLL from the Microsoft +Visual C++ CD-ROM under the Win\System directory to your computer's system or +system32 directory, and rename it to be MFCLOC.DLL. ("XXX" stands for the +language abbreviation. For example, MFC70DEU.DLL contains resources +translated to German.) If you don't do this, some of the UI elements of +your application will remain in the language of the operating system. + +///////////////////////////////////////////////////////////////////////////// diff --git a/Tests/MFC/mfc1/Resource.h b/Tests/MFC/mfc1/Resource.h new file mode 100644 index 000000000..0a9c13f57 --- /dev/null +++ b/Tests/MFC/mfc1/Resource.h @@ -0,0 +1,20 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Visual C++ generated include file. +// Used by mfc1.rc +// +#define IDD_ABOUTBOX 100 +#define IDP_OLE_INIT_FAILED 100 +#define IDR_MAINFRAME 128 +#define IDR_mfc1TYPE 129 +#define IDR_MANIFEST CREATEPROCESS_MANIFEST_RESOURCE_ID + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 130 +#define _APS_NEXT_CONTROL_VALUE 1000 +#define _APS_NEXT_SYMED_VALUE 101 +#define _APS_NEXT_COMMAND_VALUE 32771 +#endif +#endif diff --git a/Tests/MFC/mfc1/mfc1.cpp b/Tests/MFC/mfc1/mfc1.cpp new file mode 100644 index 000000000..9530cd2b9 --- /dev/null +++ b/Tests/MFC/mfc1/mfc1.cpp @@ -0,0 +1,144 @@ +// mfc1.cpp : Defines the class behaviors for the application. +// + +#include "stdafx.h" +#include "mfc1.h" +#include "MainFrm.h" + +#include "ChildFrm.h" +#include "mfc1Doc.h" +#include "mfc1View.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#endif + + +// Cmfc1App + +BEGIN_MESSAGE_MAP(Cmfc1App, CWinApp) + ON_COMMAND(ID_APP_ABOUT, OnAppAbout) + // Standard file based document commands + ON_COMMAND(ID_FILE_NEW, CWinApp::OnFileNew) + ON_COMMAND(ID_FILE_OPEN, CWinApp::OnFileOpen) + // Standard print setup command + ON_COMMAND(ID_FILE_PRINT_SETUP, CWinApp::OnFilePrintSetup) +END_MESSAGE_MAP() + + +// Cmfc1App construction + +Cmfc1App::Cmfc1App() +{ + // TODO: add construction code here, + // Place all significant initialization in InitInstance +} + + +// The one and only Cmfc1App object + +Cmfc1App theApp; + +// Cmfc1App initialization + +BOOL Cmfc1App::InitInstance() +{ + // InitCommonControls() is required on Windows XP if an application + // manifest specifies use of ComCtl32.dll version 6 or later to enable + // visual styles. Otherwise, any window creation will fail. + InitCommonControls(); + + CWinApp::InitInstance(); + + // Initialize OLE libraries + if (!AfxOleInit()) + { + AfxMessageBox(IDP_OLE_INIT_FAILED); + return FALSE; + } + AfxEnableControlContainer(); + // Standard initialization + // If you are not using these features and wish to reduce the size + // of your final executable, you should remove from the following + // the specific initialization routines you do not need + // Change the registry key under which our settings are stored + // TODO: You should modify this string to be something appropriate + // such as the name of your company or organization + SetRegistryKey(_T("Local AppWizard-Generated Applications")); + LoadStdProfileSettings(4); // Load standard INI file options (including MRU) + // Register the application's document templates. Document templates + // serve as the connection between documents, frame windows and views + CMultiDocTemplate* pDocTemplate; + pDocTemplate = new CMultiDocTemplate(IDR_mfc1TYPE, + RUNTIME_CLASS(Cmfc1Doc), + RUNTIME_CLASS(CChildFrame), // custom MDI child frame + RUNTIME_CLASS(Cmfc1View)); + if (!pDocTemplate) + return FALSE; + AddDocTemplate(pDocTemplate); + // create main MDI Frame window + CMainFrame* pMainFrame = new CMainFrame; + if (!pMainFrame || !pMainFrame->LoadFrame(IDR_MAINFRAME)) + return FALSE; + m_pMainWnd = pMainFrame; + // call DragAcceptFiles only if there's a suffix + // In an MDI app, this should occur immediately after setting m_pMainWnd + // Enable drag/drop open + m_pMainWnd->DragAcceptFiles(); + // Enable DDE Execute open + EnableShellOpen(); + RegisterShellFileTypes(TRUE); + // Parse command line for standard shell commands, DDE, file open + CCommandLineInfo cmdInfo; + ParseCommandLine(cmdInfo); + // Dispatch commands specified on the command line. Will return FALSE if + // app was launched with /RegServer, /Register, /Unregserver or /Unregister. + if (!ProcessShellCommand(cmdInfo)) + return FALSE; + // The main window has been initialized, so show and update it + pMainFrame->ShowWindow(m_nCmdShow); + pMainFrame->UpdateWindow(); + return TRUE; +} + + + +// CAboutDlg dialog used for App About + +class CAboutDlg : public CDialog +{ +public: + CAboutDlg(); + +// Dialog Data + enum { IDD = IDD_ABOUTBOX }; + +protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + +// Implementation +protected: + DECLARE_MESSAGE_MAP() +}; + +CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD) +{ +} + +void CAboutDlg::DoDataExchange(CDataExchange* pDX) +{ + CDialog::DoDataExchange(pDX); +} + +BEGIN_MESSAGE_MAP(CAboutDlg, CDialog) +END_MESSAGE_MAP() + +// App command to run the dialog +void Cmfc1App::OnAppAbout() +{ + CAboutDlg aboutDlg; + aboutDlg.DoModal(); +} + + +// Cmfc1App message handlers diff --git a/Tests/MFC/mfc1/mfc1.h b/Tests/MFC/mfc1/mfc1.h new file mode 100644 index 000000000..c273601f8 --- /dev/null +++ b/Tests/MFC/mfc1/mfc1.h @@ -0,0 +1,31 @@ +// mfc1.h : main header file for the mfc1 application +// +#pragma once + +#ifndef __AFXWIN_H__ + #error include 'stdafx.h' before including this file for PCH +#endif + +#include "resource.h" // main symbols + + +// Cmfc1App: +// See mfc1.cpp for the implementation of this class +// + +class Cmfc1App : public CWinApp +{ +public: + Cmfc1App(); + + +// Overrides +public: + virtual BOOL InitInstance(); + +// Implementation + afx_msg void OnAppAbout(); + DECLARE_MESSAGE_MAP() +}; + +extern Cmfc1App theApp; diff --git a/Tests/MFC/mfc1/mfc1.rc b/Tests/MFC/mfc1/mfc1.rc new file mode 100644 index 000000000..c96030259 --- /dev/null +++ b/Tests/MFC/mfc1/mfc1.rc @@ -0,0 +1,387 @@ +//Microsoft Visual C++ generated resource script. +// +#include "resource.h" + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// + +#include "afxres.h" + +///////////////////////////////////////////////////////////////////////////// +#undef APSTUDIO_READONLY_SYMBOLS + +#ifdef APSTUDIO_INVOKED + +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE +BEGIN + "resource.h\0" +END + +2 TEXTINCLUDE +BEGIN + "#include ""afxres.h""\r\n" + "\0" +END + +3 TEXTINCLUDE +BEGIN + "#define _AFX_NO_SPLITTER_RESOURCES\r\n" + "#define _AFX_NO_OLE_RESOURCES\r\n" + "#define _AFX_NO_TRACKER_RESOURCES\r\n" + "#define _AFX_NO_PROPERTY_RESOURCES\r\n" + "\r\n" + "#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)\r\n" + "LANGUAGE 9, 1\r\n" + "#pragma code_page(1252)\r\n" + "#include ""res\\mfc1.rc2"" // non-Microsoft Visual C++ edited resources\r\n" + "#include ""afxres.rc"" // Standard components\r\n" + "#include ""afxprint.rc"" // printing/print preview resources\r\n" + "#endif\r\n" + "\0" +END + +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// Icon +// + +// Icon with lowest ID value placed first to ensure application icon +// remains consistent on all systems. + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) +LANGUAGE 9, 1 +#pragma code_page(1252) +IDR_MAINFRAME ICON "res\\mfc1.ico" +IDR_mfc1TYPE ICON "res\\mfc1Doc.ico" +#endif +///////////////////////////////////////////////////////////////////////////// +// +// Bitmap +// + +IDR_MAINFRAME BITMAP "res\\Toolbar.bmp" + +///////////////////////////////////////////////////////////////////////////// +// +// Toolbar +// + +IDR_MAINFRAME TOOLBAR 16, 15 +BEGIN + BUTTON ID_FILE_NEW + BUTTON ID_FILE_OPEN + BUTTON ID_FILE_SAVE + SEPARATOR + BUTTON ID_EDIT_CUT + BUTTON ID_EDIT_COPY + BUTTON ID_EDIT_PASTE + SEPARATOR + BUTTON ID_FILE_PRINT + BUTTON ID_APP_ABOUT +END + + + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) +LANGUAGE 9, 1 +#pragma code_page(1252) +///////////////////////////////////////////////////////////////////////////// +// +// Menu +// + +IDR_MAINFRAME MENU +BEGIN + POPUP "&File" + BEGIN + MENUITEM "&New\tCtrl+N", ID_FILE_NEW + MENUITEM "&Open...\tCtrl+O", ID_FILE_OPEN + MENUITEM SEPARATOR + MENUITEM "P&rint Setup...", ID_FILE_PRINT_SETUP + MENUITEM SEPARATOR + MENUITEM "Recent File", ID_FILE_MRU_FILE1,GRAYED + MENUITEM SEPARATOR + MENUITEM "&Close", ID_FILE_CLOSE + MENUITEM "E&xit", ID_APP_EXIT + END + POPUP "&View" + BEGIN + MENUITEM "&Toolbar", ID_VIEW_TOOLBAR + MENUITEM "&Status Bar", ID_VIEW_STATUS_BAR + END + POPUP "&Help" + BEGIN + MENUITEM "&About mfc1...", ID_APP_ABOUT + END +END +IDR_mfc1TYPE MENU +BEGIN + POPUP "&File" + BEGIN + MENUITEM "&New\tCtrl+N", ID_FILE_NEW + MENUITEM "&Open...\tCtrl+O", ID_FILE_OPEN + MENUITEM "&Close", ID_FILE_CLOSE + MENUITEM "&Save\tCtrl+S", ID_FILE_SAVE + MENUITEM "Save &As...", ID_FILE_SAVE_AS + MENUITEM SEPARATOR + MENUITEM "&Print...\tCtrl+P", ID_FILE_PRINT + MENUITEM "Print Pre&view", ID_FILE_PRINT_PREVIEW + MENUITEM "P&rint Setup...", ID_FILE_PRINT_SETUP + MENUITEM SEPARATOR + MENUITEM "Recent File", ID_FILE_MRU_FILE1,GRAYED + MENUITEM SEPARATOR + MENUITEM "E&xit", ID_APP_EXIT + END + POPUP "&Edit" + BEGIN + MENUITEM "&Undo\tCtrl+Z", ID_EDIT_UNDO + MENUITEM SEPARATOR + MENUITEM "Cu&t\tCtrl+X", ID_EDIT_CUT + MENUITEM "&Copy\tCtrl+C", ID_EDIT_COPY + MENUITEM "&Paste\tCtrl+V", ID_EDIT_PASTE + END + POPUP "&View" + BEGIN + MENUITEM "&Toolbar", ID_VIEW_TOOLBAR + MENUITEM "&Status Bar", ID_VIEW_STATUS_BAR + END + POPUP "&Window" + BEGIN + MENUITEM "&New Window", ID_WINDOW_NEW + MENUITEM "&Cascade", ID_WINDOW_CASCADE + MENUITEM "&Tile", ID_WINDOW_TILE_HORZ + MENUITEM "&Arrange Icons", ID_WINDOW_ARRANGE + END + POPUP "&Help" + BEGIN + MENUITEM "&About mfc1...", ID_APP_ABOUT + END +END + + +///////////////////////////////////////////////////////////////////////////// +// +// Accelerator +// + +IDR_MAINFRAME ACCELERATORS +BEGIN + "N", ID_FILE_NEW, VIRTKEY,CONTROL + "O", ID_FILE_OPEN, VIRTKEY,CONTROL + "S", ID_FILE_SAVE, VIRTKEY,CONTROL + "P", ID_FILE_PRINT, VIRTKEY,CONTROL + "Z", ID_EDIT_UNDO, VIRTKEY,CONTROL + "X", ID_EDIT_CUT, VIRTKEY,CONTROL + "C", ID_EDIT_COPY, VIRTKEY,CONTROL + "V", ID_EDIT_PASTE, VIRTKEY,CONTROL + VK_BACK, ID_EDIT_UNDO, VIRTKEY,ALT + VK_DELETE, ID_EDIT_CUT, VIRTKEY,SHIFT + VK_INSERT, ID_EDIT_COPY, VIRTKEY,CONTROL + VK_INSERT, ID_EDIT_PASTE, VIRTKEY,SHIFT + VK_F6, ID_NEXT_PANE, VIRTKEY + VK_F6, ID_PREV_PANE, VIRTKEY,SHIFT +END + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog +// + +IDD_ABOUTBOX DIALOGEX 0, 0, 235, 55 +CAPTION "About mfc1" +STYLE DS_MODALFRAME | DS_SHELLFONT | WS_POPUP | WS_CAPTION | WS_SYSMENU +FONT 8, "MS Shell Dlg" +BEGIN + ICON IDR_MAINFRAME,IDC_STATIC,11,17,20,20 + LTEXT "mfc1 Version 1.0",IDC_STATIC,40,10,119,8, + SS_NOPREFIX + LTEXT "Copyright (C) 2011",IDC_STATIC,40,25,119,8 + DEFPUSHBUTTON "OK",IDOK,178,7,50,16,WS_GROUP +END + + +///////////////////////////////////////////////////////////////////////////// +// +// Version +// + +VS_VERSION_INFO VERSIONINFO + FILEVERSION 1,0,0,1 + PRODUCTVERSION 1,0,0,1 + FILEFLAGSMASK 0x3fL +#ifdef _DEBUG + FILEFLAGS 0x1L +#else + FILEFLAGS 0x0L +#endif + FILEOS 0x4L + FILETYPE 0x1L + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904e4" + BEGIN + VALUE "CompanyName", "TODO: " + VALUE "FileDescription", "TODO: " + VALUE "FileVersion", "1.0.0.1" + VALUE "InternalName", "mfc1.exe" + VALUE "LegalCopyright", "TODO: (c) . All rights reserved." + VALUE "OriginalFilename","mfc1.exe" + VALUE "ProductName", "TODO: " + VALUE "ProductVersion", "1.0.0.1" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x0409, 1252 + END +END + +///////////////////////////////////////////////////////////////////////////// +// +// DESIGNINFO +// + +#ifdef APSTUDIO_INVOKED +GUIDELINES DESIGNINFO +BEGIN + IDD_ABOUTBOX, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 228 + TOPMARGIN, 7 + BOTTOMMARGIN, 48 + END +END +#endif // APSTUDIO_INVOKED + +///////////////////////////////////////////////////////////////////////////// +// +// String Table +// + +STRINGTABLE +BEGIN +// Non-mac-targeting apps remove the two extra substrings + IDR_MAINFRAME "mfc1" + // has a file suffix - shell file type too + IDR_mfc1TYPE "\nmfc1\nmfc1\nmfc1 Files (*.mf1)\n.mf1\nmfc1.Document\nmfc1.Document" +END +STRINGTABLE +BEGIN + AFX_IDS_APP_TITLE "mfc1" + AFX_IDS_IDLEMESSAGE "Ready" +END +STRINGTABLE +BEGIN + ID_INDICATOR_EXT "EXT" + ID_INDICATOR_CAPS "CAP" + ID_INDICATOR_NUM "NUM" + ID_INDICATOR_SCRL "SCRL" + ID_INDICATOR_OVR "OVR" + ID_INDICATOR_REC "REC" +END +STRINGTABLE +BEGIN + ID_FILE_NEW "Create a new document\nNew" + ID_FILE_OPEN "Open an existing document\nOpen" + ID_FILE_CLOSE "Close the active document\nClose" + ID_FILE_SAVE "Save the active document\nSave" + ID_FILE_SAVE_AS "Save the active document with a new name\nSave As" + ID_FILE_PAGE_SETUP "Change the printing options\nPage Setup" + ID_FILE_PRINT_SETUP "Change the printer and printing options\nPrint Setup" + ID_FILE_PRINT "Print the active document\nPrint" + ID_FILE_PRINT_PREVIEW "Display full pages\nPrint Preview" + ID_APP_ABOUT "Display program information, version number and copyright\nAbout" + ID_APP_EXIT "Quit the application; prompts to save documents\nExit" + ID_FILE_MRU_FILE1 "Open this document" + ID_FILE_MRU_FILE2 "Open this document" + ID_FILE_MRU_FILE3 "Open this document" + ID_FILE_MRU_FILE4 "Open this document" + ID_FILE_MRU_FILE5 "Open this document" + ID_FILE_MRU_FILE6 "Open this document" + ID_FILE_MRU_FILE7 "Open this document" + ID_FILE_MRU_FILE8 "Open this document" + ID_FILE_MRU_FILE9 "Open this document" + ID_FILE_MRU_FILE10 "Open this document" + ID_FILE_MRU_FILE11 "Open this document" + ID_FILE_MRU_FILE12 "Open this document" + ID_FILE_MRU_FILE13 "Open this document" + ID_FILE_MRU_FILE14 "Open this document" + ID_FILE_MRU_FILE15 "Open this document" + ID_FILE_MRU_FILE16 "Open this document" + ID_NEXT_PANE "Switch to the next window pane\nNext Pane" + ID_PREV_PANE "Switch back to the previous window pane\nPrevious Pane" + ID_WINDOW_NEW "Open another window for the active document\nNew Window" + ID_WINDOW_ARRANGE "Arrange icons at the bottom of the window\nArrange Icons" + ID_WINDOW_CASCADE "Arrange windows so they overlap\nCascade Windows" + ID_WINDOW_TILE_HORZ "Arrange windows as non-overlapping tiles\nTile Windows" + ID_WINDOW_TILE_VERT "Arrange windows as non-overlapping tiles\nTile Windows" + ID_WINDOW_SPLIT "Split the active window into panes\nSplit" + ID_EDIT_CLEAR "Erase the selection\nErase" + ID_EDIT_CLEAR_ALL "Erase everything\nErase All" + ID_EDIT_COPY "Copy the selection and put it on the Clipboard\nCopy" + ID_EDIT_CUT "Cut the selection and put it on the Clipboard\nCut" + ID_EDIT_FIND "Find the specified text\nFind" + ID_EDIT_PASTE "Insert Clipboard contents\nPaste" + ID_EDIT_REPEAT "Repeat the last action\nRepeat" + ID_EDIT_REPLACE "Replace specific text with different text\nReplace" + ID_EDIT_SELECT_ALL "Select the entire document\nSelect All" + ID_EDIT_UNDO "Undo the last action\nUndo" + ID_EDIT_REDO "Redo the previously undone action\nRedo" + ID_VIEW_TOOLBAR "Show or hide the toolbar\nToggle ToolBar" + ID_VIEW_STATUS_BAR "Show or hide the status bar\nToggle StatusBar" +END + +STRINGTABLE +BEGIN + AFX_IDS_SCSIZE "Change the window size" + AFX_IDS_SCMOVE "Change the window position" + AFX_IDS_SCMINIMIZE "Reduce the window to an icon" + AFX_IDS_SCMAXIMIZE "Enlarge the window to full size" + AFX_IDS_SCNEXTWINDOW "Switch to the next document window" + AFX_IDS_SCPREVWINDOW "Switch to the previous document window" + AFX_IDS_SCCLOSE "Close the active window and prompts to save the documents" + AFX_IDS_SCRESTORE "Restore the window to normal size" + AFX_IDS_SCTASKLIST "Activate Task List" + AFX_IDS_MDICHILD "Activate this window" + AFX_IDS_PREVIEW_CLOSE "Close print preview mode\nCancel Preview" +END + +#endif + +#ifdef _UNICODE +IDR_MANIFEST RT_MANIFEST "res\\mfc1.manifest" +#endif + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// + +#define _AFX_NO_SPLITTER_RESOURCES +#define _AFX_NO_OLE_RESOURCES +#define _AFX_NO_TRACKER_RESOURCES +#define _AFX_NO_PROPERTY_RESOURCES + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) +LANGUAGE 9, 1 +#pragma code_page(1252) +#include "res\\mfc1.rc2" // non-Microsoft Visual C++ edited resources +#include "afxres.rc" // Standard components +#include "afxprint.rc" // printing/print preview resources +#endif +#endif // not APSTUDIO_INVOKED diff --git a/Tests/MFC/mfc1/mfc1.reg b/Tests/MFC/mfc1/mfc1.reg new file mode 100644 index 000000000..9f3a86ffb --- /dev/null +++ b/Tests/MFC/mfc1/mfc1.reg @@ -0,0 +1,13 @@ +REGEDIT +; This .REG file may be used by your SETUP program. +; If a SETUP program is not available, the entries below will be +; registered in your InitInstance automatically with a call to +; CWinApp::RegisterShellFileTypes and COleObjectFactory::UpdateRegistryAll. + +HKEY_CLASSES_ROOT\.mf1 = mfc1.Document +HKEY_CLASSES_ROOT\mfc1.Document\shell\open\command = mfc1.EXE %1 +HKEY_CLASSES_ROOT\mfc1.Document\shell\open\ddeexec = [open("%1")] +HKEY_CLASSES_ROOT\mfc1.Document\shell\open\ddeexec\application = mfc1 + ; note: the application is optional + ; (it defaults to the app name in "command") +HKEY_CLASSES_ROOT\mfc1.Document = mfc1.Document diff --git a/Tests/MFC/mfc1/mfc1.sln b/Tests/MFC/mfc1/mfc1.sln new file mode 100644 index 000000000..78bbe56f2 --- /dev/null +++ b/Tests/MFC/mfc1/mfc1.sln @@ -0,0 +1,21 @@ +Microsoft Visual Studio Solution File, Format Version 8.00 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mfc1", "mfc1.vcproj", "{06C08100-1145-4104-AEC3-6BC8C608B819}" + ProjectSection(ProjectDependencies) = postProject + EndProjectSection +EndProject +Global + GlobalSection(SolutionConfiguration) = preSolution + Debug = Debug + Release = Release + EndGlobalSection + GlobalSection(ProjectConfiguration) = postSolution + {06C08100-1145-4104-AEC3-6BC8C608B819}.Debug.ActiveCfg = Debug|Win32 + {06C08100-1145-4104-AEC3-6BC8C608B819}.Debug.Build.0 = Debug|Win32 + {06C08100-1145-4104-AEC3-6BC8C608B819}.Release.ActiveCfg = Release|Win32 + {06C08100-1145-4104-AEC3-6BC8C608B819}.Release.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + EndGlobalSection + GlobalSection(ExtensibilityAddIns) = postSolution + EndGlobalSection +EndGlobal diff --git a/Tests/MFC/mfc1/mfc1.vcproj b/Tests/MFC/mfc1/mfc1.vcproj new file mode 100644 index 000000000..6df86e564 --- /dev/null +++ b/Tests/MFC/mfc1/mfc1.vcproj @@ -0,0 +1,216 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Tests/MFC/mfc1/mfc1Doc.cpp b/Tests/MFC/mfc1/mfc1Doc.cpp new file mode 100644 index 000000000..8767052ed --- /dev/null +++ b/Tests/MFC/mfc1/mfc1Doc.cpp @@ -0,0 +1,78 @@ +// mfc1Doc.cpp : implementation of the Cmfc1Doc class +// + +#include "stdafx.h" +#include "mfc1.h" + +#include "mfc1Doc.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#endif + + +// Cmfc1Doc + +IMPLEMENT_DYNCREATE(Cmfc1Doc, CDocument) + +BEGIN_MESSAGE_MAP(Cmfc1Doc, CDocument) +END_MESSAGE_MAP() + + +// Cmfc1Doc construction/destruction + +Cmfc1Doc::Cmfc1Doc() +{ + // TODO: add one-time construction code here + +} + +Cmfc1Doc::~Cmfc1Doc() +{ +} + +BOOL Cmfc1Doc::OnNewDocument() +{ + if (!CDocument::OnNewDocument()) + return FALSE; + + // TODO: add reinitialization code here + // (SDI documents will reuse this document) + + return TRUE; +} + + + + +// Cmfc1Doc serialization + +void Cmfc1Doc::Serialize(CArchive& ar) +{ + if (ar.IsStoring()) + { + // TODO: add storing code here + } + else + { + // TODO: add loading code here + } +} + + +// Cmfc1Doc diagnostics + +#ifdef _DEBUG +void Cmfc1Doc::AssertValid() const +{ + CDocument::AssertValid(); +} + +void Cmfc1Doc::Dump(CDumpContext& dc) const +{ + CDocument::Dump(dc); +} +#endif //_DEBUG + + +// Cmfc1Doc commands diff --git a/Tests/MFC/mfc1/mfc1Doc.h b/Tests/MFC/mfc1/mfc1Doc.h new file mode 100644 index 000000000..92d8e3541 --- /dev/null +++ b/Tests/MFC/mfc1/mfc1Doc.h @@ -0,0 +1,37 @@ +// mfc1Doc.h : interface of the Cmfc1Doc class +// + + +#pragma once + +class Cmfc1Doc : public CDocument +{ +protected: // create from serialization only + Cmfc1Doc(); + DECLARE_DYNCREATE(Cmfc1Doc) + +// Attributes +public: + +// Operations +public: + +// Overrides + public: + virtual BOOL OnNewDocument(); + virtual void Serialize(CArchive& ar); + +// Implementation +public: + virtual ~Cmfc1Doc(); +#ifdef _DEBUG + virtual void AssertValid() const; + virtual void Dump(CDumpContext& dc) const; +#endif + +protected: + +// Generated message map functions +protected: + DECLARE_MESSAGE_MAP() +}; diff --git a/Tests/MFC/mfc1/mfc1View.cpp b/Tests/MFC/mfc1/mfc1View.cpp new file mode 100644 index 000000000..06c765230 --- /dev/null +++ b/Tests/MFC/mfc1/mfc1View.cpp @@ -0,0 +1,99 @@ +// mfc1View.cpp : implementation of the Cmfc1View class +// + +#include "stdafx.h" +#include "mfc1.h" + +#include "mfc1Doc.h" +#include "mfc1View.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#endif + + +// Cmfc1View + +IMPLEMENT_DYNCREATE(Cmfc1View, CView) + +BEGIN_MESSAGE_MAP(Cmfc1View, CView) + // Standard printing commands + ON_COMMAND(ID_FILE_PRINT, CView::OnFilePrint) + ON_COMMAND(ID_FILE_PRINT_DIRECT, CView::OnFilePrint) + ON_COMMAND(ID_FILE_PRINT_PREVIEW, CView::OnFilePrintPreview) +END_MESSAGE_MAP() + +// Cmfc1View construction/destruction + +Cmfc1View::Cmfc1View() +{ + // TODO: add construction code here + +} + +Cmfc1View::~Cmfc1View() +{ +} + +BOOL Cmfc1View::PreCreateWindow(CREATESTRUCT& cs) +{ + // TODO: Modify the Window class or styles here by modifying + // the CREATESTRUCT cs + + return CView::PreCreateWindow(cs); +} + +// Cmfc1View drawing + +void Cmfc1View::OnDraw(CDC* /*pDC*/) +{ + Cmfc1Doc* pDoc = GetDocument(); + ASSERT_VALID(pDoc); + if (!pDoc) + return; + + // TODO: add draw code for native data here +} + + +// Cmfc1View printing + +BOOL Cmfc1View::OnPreparePrinting(CPrintInfo* pInfo) +{ + // default preparation + return DoPreparePrinting(pInfo); +} + +void Cmfc1View::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/) +{ + // TODO: add extra initialization before printing +} + +void Cmfc1View::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/) +{ + // TODO: add cleanup after printing +} + + +// Cmfc1View diagnostics + +#ifdef _DEBUG +void Cmfc1View::AssertValid() const +{ + CView::AssertValid(); +} + +void Cmfc1View::Dump(CDumpContext& dc) const +{ + CView::Dump(dc); +} + +Cmfc1Doc* Cmfc1View::GetDocument() const // non-debug version is inline +{ + ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(Cmfc1Doc))); + return (Cmfc1Doc*)m_pDocument; +} +#endif //_DEBUG + + +// Cmfc1View message handlers diff --git a/Tests/MFC/mfc1/mfc1View.h b/Tests/MFC/mfc1/mfc1View.h new file mode 100644 index 000000000..42446536b --- /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(m_pDocument); } +#endif diff --git a/Tests/MFC/mfc1/res/Toolbar.bmp b/Tests/MFC/mfc1/res/Toolbar.bmp new file mode 100644 index 0000000000000000000000000000000000000000..d501723c1ceb781cccf04bc42408a2bee6b0eab4 GIT binary patch literal 1078 zcmb_byK2Kg5WFD46)N-_DGd%mbvRHJ@+(`2Y#@z5De^h$T}Yp#;yM?~%&rw%!DZII z_s!1Ct^M-)Tn3AG^p9vgT8;J){9rDyxEsA+?t8wt)o$n@0`>@NK8bGHkdKdb4m#tglAgQo-)Js1!#;+~GSl z37z4Z<|(I?jV44Q_xOeQ!(IFmLY86pVjciLPfC9(?0)$t7hw7W^>>N<@a4LVKPMb~ ze5>=j|BL>!3lPen5hUo~ANKN`l7C&3 z%0PPq3XFRT-e1OO0*EKjOA>DIfd!JKE>l7s8ZOWoALnDl7bEaBMvn{Ll0`lMj_p*2 zeyj@cEB=w(f%+@Ig9SfK=ePQ9c)El>T>d0F2ei{lnHqPg}It<8 literal 0 HcmV?d00001 diff --git a/Tests/MFC/mfc1/res/mfc1.ico b/Tests/MFC/mfc1/res/mfc1.ico new file mode 100644 index 0000000000000000000000000000000000000000..8a84ca3d34597ada57e4c79ef62b28cf07b5ed9a GIT binary patch literal 21630 zcmeHv2V7N0+WxDFG5L~RW2&1XG0AQcqhg7@#)>^Q6a+;<1hFAlu+c$4ii*+|l&Ul- zQbg%pk={WR0YwD_E?oNe%sKa75z*}WCHvp~{rFMz& z91+A%k78nCkkP|=>gi!2&LN0s4;38j*Oe8VkT_G}^I%y)kG0sD_6n922!+C-!*CD^ zP4OEFHw-~eey9{z1oHYUeW;2_V1o(+3RUR1Jwc~-QK{(n-Q!(a_OedLke z3(uSDm)vh3{llR0`Terszk>g{eMCll$(}5o)BmFVMHTj9eWCJ2&Qu)e>1i!{ReLBq z#2Nv2;9CP1JXXdx6kYDdxC2W!ErVkLUDPf@ zn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N6RA!JD)i20JWl V7_3;)FxY%t!w{8u!r68W{|isv(C`2N literal 0 HcmV?d00001 diff --git a/Tests/MFC/mfc1/res/mfc1.manifest b/Tests/MFC/mfc1/res/mfc1.manifest new file mode 100644 index 000000000..b15d2f2f2 --- /dev/null +++ b/Tests/MFC/mfc1/res/mfc1.manifest @@ -0,0 +1,22 @@ + + + +Your app description here + + + + + + diff --git a/Tests/MFC/mfc1/res/mfc1.rc2 b/Tests/MFC/mfc1/res/mfc1.rc2 new file mode 100644 index 000000000..62a3ab0d6 --- /dev/null +++ b/Tests/MFC/mfc1/res/mfc1.rc2 @@ -0,0 +1,13 @@ +// +// mfc1.RC2 - resources Microsoft Visual C++ does not edit directly +// + +#ifdef APSTUDIO_INVOKED +#error this file is not editable by Microsoft Visual C++ +#endif //APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// Add manually edited resources here... + +///////////////////////////////////////////////////////////////////////////// diff --git a/Tests/MFC/mfc1/res/mfc1Doc.ico b/Tests/MFC/mfc1/res/mfc1Doc.ico new file mode 100644 index 0000000000000000000000000000000000000000..2a1f1ae6ef15e51df8c39bc028bbfb2171822ba5 GIT binary patch literal 1078 zcmcJNF;c@Y5JlGsgIpoERJdY%i*S@2!JS&si6f-)RXoFGDAfg5;z_dQBoi_)1DpI^ z{oS?KlD%25H@>BZ{KJV|_dD9_G1MV<{5a&-}7^W%4AM)k- zx&P*V(j}a@*Y~UhksXTAK!NRyiYN-8NMyKz<)2v9@tUao7A!g+SzkAcsHvdq6!0vQ z#-rA6>0BAr)4*u6Y57EdkamnXf Uh-a7VEuQ2KJb_2>o71HC3-%7w@Bjb+ literal 0 HcmV?d00001 diff --git a/Tests/MFC/mfc1/stdafx.cpp b/Tests/MFC/mfc1/stdafx.cpp new file mode 100644 index 000000000..67fd1b539 --- /dev/null +++ b/Tests/MFC/mfc1/stdafx.cpp @@ -0,0 +1,5 @@ +// stdafx.cpp : source file that includes just the standard includes +// mfc1.pch will be the pre-compiled header +// stdafx.obj will contain the pre-compiled type information + +#include "stdafx.h" diff --git a/Tests/MFC/mfc1/stdafx.h b/Tests/MFC/mfc1/stdafx.h new file mode 100644 index 000000000..fb9dfb33d --- /dev/null +++ b/Tests/MFC/mfc1/stdafx.h @@ -0,0 +1,41 @@ +// stdafx.h : include file for standard system include files, +// or project specific include files that are used frequently, +// but are changed infrequently + +#pragma once + +#ifndef VC_EXTRALEAN +#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers +#endif + +// Modify the following defines if you have to target a platform prior to the ones specified below. +// Refer to MSDN for the latest info on corresponding values for different platforms. +#ifndef WINVER // Allow use of features specific to Windows 95 and Windows NT 4 or later. +#define WINVER 0x0400 // Change this to the appropriate value to target Windows 98 and Windows 2000 or later. +#endif + +#ifndef _WIN32_WINNT // Allow use of features specific to Windows NT 4 or later. +#define _WIN32_WINNT 0x0400 // Change this to the appropriate value to target Windows 98 and Windows 2000 or later. +#endif + +#ifndef _WIN32_WINDOWS // Allow use of features specific to Windows 98 or later. +#define _WIN32_WINDOWS 0x0410 // Change this to the appropriate value to target Windows Me or later. +#endif + +#ifndef _WIN32_IE // Allow use of features specific to IE 4.0 or later. +#define _WIN32_IE 0x0400 // Change this to the appropriate value to target IE 5.0 or later. +#endif + +#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS // some CString constructors will be explicit + +// turns off MFC's hiding of some common and often safely ignored warning messages +#define _AFX_ALL_WARNINGS + +#include // MFC core and standard components +#include // MFC extensions +#include // MFC Automation classes + +#include // MFC support for Internet Explorer 4 Common Controls +#ifndef _AFX_NO_AFXCMN_SUPPORT +#include // MFC support for Windows Common Controls +#endif // _AFX_NO_AFXCMN_SUPPORT