[Sphere-axis-commits] CVS: Utilities/SWizard resource.h,NONE,1.1 stdafx.cpp,NONE,1.1 stdafx.h,NONE,1
Brought to you by:
pesterle
Update of /cvsroot/sphere-axis/Utilities/SWizard In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28176/SWizard Added Files: resource.h stdafx.cpp stdafx.h SWizard.cpp SWizard.h SWizard.rc SWizard.vcproj SWizardDlg.cpp SWizardDlg.h Log Message: no message --- NEW FILE: resource.h --- //{{NO_DEPENDENCIES}} // Microsoft Visual C++ generated include file. // Used by SWizard.rc // #define IDR_MANIFEST 1 #define IDM_ABOUTBOX 0x0010 #define IDD_ABOUTBOX 100 #define IDS_ABOUTBOX 101 #define IDD_SWIZARD_DIALOG 102 #define IDR_MAINFRAME 128 #define IDC_LIBRARYNAME 1000 #define IDC_CLASSNAME 1001 #define IDC_RADIO1 1002 #define IDC_RADIO2 1003 #define IDC_RADIO3 1004 #define IDC_STATUS 1005 #define IDC_CREATEFILES 1006 #define IDC_OUTPUTPATH 1007 #define IDC_BROWSEPATH 1008 // Next default values for new objects // #ifdef APSTUDIO_INVOKED #ifndef APSTUDIO_READONLY_SYMBOLS #define _APS_NEXT_RESOURCE_VALUE 129 #define _APS_NEXT_COMMAND_VALUE 32771 #define _APS_NEXT_CONTROL_VALUE 1000 #define _APS_NEXT_SYMED_VALUE 101 #endif #endif --- NEW FILE: stdafx.cpp --- // stdafx.cpp : source file that includes just the standard includes // SWizard.pch will be the pre-compiled header // stdafx.obj will contain the pre-compiled type information #include "stdafx.h" --- NEW FILE: stdafx.h --- // 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 <afxwin.h> // MFC core and standard components #include <afxext.h> // MFC extensions #include <afxdisp.h> // MFC Automation classes #include <afxdtctl.h> // MFC support for Internet Explorer 4 Common Controls #ifndef _AFX_NO_AFXCMN_SUPPORT #include <afxcmn.h> // MFC support for Windows Common Controls #endif // _AFX_NO_AFXCMN_SUPPORT --- NEW FILE: SWizard.cpp --- // SWizard.cpp : Defines the class behaviors for the application. // #include "stdafx.h" #include "SWizard.h" #include "SWizardDlg.h" #ifdef _DEBUG #define new DEBUG_NEW #endif // CSWizardApp BEGIN_MESSAGE_MAP(CSWizardApp, CWinApp) ON_COMMAND(ID_HELP, CWinApp::OnHelp) END_MESSAGE_MAP() // CSWizardApp construction CSWizardApp::CSWizardApp() { // TODO: add construction code here, // Place all significant initialization in InitInstance } // The one and only CSWizardApp object CSWizardApp theApp; // CSWizardApp initialization BOOL CSWizardApp::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(); AfxEnableControlContainer(); CSWizardDlg dlg; m_pMainWnd = &dlg; INT_PTR nResponse = dlg.DoModal(); if (nResponse == IDOK) { // TODO: Place code here to handle when the dialog is // dismissed with OK } else if (nResponse == IDCANCEL) { // TODO: Place code here to handle when the dialog is // dismissed with Cancel } // Since the dialog has been closed, return FALSE so that we exit the // application, rather than start the application's message pump. return FALSE; } --- NEW FILE: SWizard.h --- // SWizard.h : main header file for the PROJECT_NAME application // #pragma once #ifndef __AFXWIN_H__ #error include 'stdafx.h' before including this file for PCH #endif #include "resource.h" // main symbols // CSWizardApp: // See SWizard.cpp for the implementation of this class // class CSWizardApp : public CWinApp { public: CSWizardApp(); // Overrides public: virtual BOOL InitInstance(); // Implementation DECLARE_MESSAGE_MAP() }; extern CSWizardApp theApp; --- NEW FILE: SWizard.rc --- // 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 ///////////////////////////////////////////////////////////////////////////// // English (U.S.) resources #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) #ifdef _WIN32 LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US #pragma code_page(1252) #endif //_WIN32 #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\\SWizard.rc2"" // non-Microsoft Visual C++ edited resources\r\n" "#include ""afxres.rc"" // Standard components\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. IDR_MAINFRAME ICON "res\\SWizard.ico" ///////////////////////////////////////////////////////////////////////////// // // Dialog // IDD_ABOUTBOX DIALOGEX 0, 0, 235, 55 STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "About SWizard" FONT 8, "MS Shell Dlg", 0, 0, 0x1 BEGIN ICON IDR_MAINFRAME,IDC_STATIC,11,17,20,20 LTEXT "SWizard Version 1.0",IDC_STATIC,40,10,119,8,SS_NOPREFIX LTEXT "Copyright (C) 2004 Philip A. Esterle",IDC_STATIC,40,25, 119,8 DEFPUSHBUTTON "OK",IDOK,178,7,50,16,WS_GROUP END IDD_SWIZARD_DIALOG DIALOGEX 0, 0, 320, 200 STYLE DS_SETFONT | DS_FIXEDSYS | WS_MINIMIZEBOX | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME EXSTYLE WS_EX_APPWINDOW CAPTION "Script Module Wizard" FONT 8, "MS Shell Dlg", 0, 0, 0x1 BEGIN EDITTEXT IDC_OUTPUTPATH,55,15,145,14,ES_AUTOHSCROLL PUSHBUTTON "Browse",IDC_BROWSEPATH,205,16,45,12 EDITTEXT IDC_LIBRARYNAME,56,41,97,13,ES_AUTOHSCROLL EDITTEXT IDC_CLASSNAME,56,56,98,14,ES_AUTOHSCROLL CONTROL "C++",IDC_RADIO1,"Button",BS_AUTORADIOBUTTON | WS_GROUP, 29,84,31,10 CONTROL "C#",IDC_RADIO2,"Button",BS_AUTORADIOBUTTON,67,84,26,10 CONTROL "VB",IDC_RADIO3,"Button",BS_AUTORADIOBUTTON,105,84,24,10 DEFPUSHBUTTON "Create Files",IDC_CREATEFILES,161,82,57,15 PUSHBUTTON "Finished",IDOK,263,7,50,16 LTEXT "Library Name",IDC_STATIC,12,43,44,8 LTEXT "Class Name",IDC_STATIC,18,59,38,8 GROUPBOX "Static",IDC_STATIC,7,32,151,41 GROUPBOX "Language Properties",IDC_STATIC,7,73,151,26 EDITTEXT IDC_STATUS,7,101,306,92,ES_MULTILINE | ES_AUTOHSCROLL | ES_READONLY | WS_VSCROLL GROUPBOX "Output",IDC_STATIC,7,7,249,26 LTEXT "Output Path",IDC_STATIC,13,18,40,8 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: <Company name>" VALUE "FileDescription", "TODO: <File description>" VALUE "FileVersion", "1.0.0.1" VALUE "InternalName", "SWizard.exe" VALUE "LegalCopyright", "TODO: (c) <Company name>. All rights reserved." VALUE "OriginalFilename", "SWizard.exe" VALUE "ProductName", "TODO: <Product name>" VALUE "ProductVersion", "1.0.0.1" END END BLOCK "VarFileInfo" BEGIN VALUE "Translation", 0x409, 1252 END END ///////////////////////////////////////////////////////////////////////////// // // DESIGNINFO // #ifdef APSTUDIO_INVOKED GUIDELINES DESIGNINFO BEGIN IDD_ABOUTBOX, DIALOG BEGIN LEFTMARGIN, 7 RIGHTMARGIN, 228 TOPMARGIN, 7 BOTTOMMARGIN, 48 END IDD_SWIZARD_DIALOG, DIALOG BEGIN LEFTMARGIN, 7 RIGHTMARGIN, 313 TOPMARGIN, 7 BOTTOMMARGIN, 193 END END #endif // APSTUDIO_INVOKED ///////////////////////////////////////////////////////////////////////////// // // RT_MANIFEST // IDR_MANIFEST RT_MANIFEST "res\\SWizard.manifest" ///////////////////////////////////////////////////////////////////////////// // // String Table // STRINGTABLE BEGIN IDS_ABOUTBOX "&About SWizard..." END #endif // English (U.S.) resources ///////////////////////////////////////////////////////////////////////////// #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\SWizard.rc2" // non-Microsoft Visual C++ edited resources #include "afxres.rc" // Standard components #endif ///////////////////////////////////////////////////////////////////////////// #endif // not APSTUDIO_INVOKED --- NEW FILE: SWizard.vcproj --- <?xml version="1.0" encoding = "Windows-1252"?> <VisualStudioProject ProjectType="Visual C++" Version="7.00" Name="SWizard" ProjectGUID="{B3AC4059-8C35-48F7-8597-AB85C795E12B}" Keyword="MFCProj"> <Platforms> <Platform Name="Win32"/> </Platforms> <Configurations> <Configuration Name="Debug|Win32" OutputDirectory="Debug" IntermediateDirectory="Debug" ConfigurationType="1" UseOfMFC="1" CharacterSet="2"> <Tool Name="VCCLCompilerTool" Optimization="0" PreprocessorDefinitions="WIN32;_WINDOWS;_DEBUG" MinimalRebuild="TRUE" BasicRuntimeChecks="3" RuntimeLibrary="1" TreatWChar_tAsBuiltInType="TRUE" UsePrecompiledHeader="3" WarningLevel="3" Detect64BitPortabilityProblems="TRUE" DebugInformationFormat="4"/> <Tool Name="VCCustomBuildTool"/> <Tool Name="VCLinkerTool" AdditionalDependencies="rpcrt4.lib" LinkIncremental="2" GenerateDebugInformation="TRUE" SubSystem="2" TargetMachine="1"/> <Tool Name="VCMIDLTool" PreprocessorDefinitions="_DEBUG" MkTypLibCompatible="FALSE"/> <Tool Name="VCPostBuildEventTool"/> <Tool Name="VCPreBuildEventTool"/> <Tool Name="VCPreLinkEventTool"/> <Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="_DEBUG" Culture="1033" AdditionalIncludeDirectories="$(IntDir)"/> <Tool Name="VCWebServiceProxyGeneratorTool"/> <Tool Name="VCWebDeploymentTool"/> </Configuration> <Configuration Name="Release|Win32" OutputDirectory="Release" IntermediateDirectory="Release" ConfigurationType="1" UseOfMFC="1" CharacterSet="2"> <Tool Name="VCCLCompilerTool" Optimization="2" InlineFunctionExpansion="1" OmitFramePointers="TRUE" PreprocessorDefinitions="WIN32;_WINDOWS;NDEBUG" StringPooling="TRUE" MinimalRebuild="FALSE" RuntimeLibrary="0" EnableFunctionLevelLinking="TRUE" TreatWChar_tAsBuiltInType="TRUE" UsePrecompiledHeader="3" WarningLevel="3" Detect64BitPortabilityProblems="TRUE" DebugInformationFormat="3"/> <Tool Name="VCCustomBuildTool"/> <Tool Name="VCLinkerTool" LinkIncremental="1" GenerateDebugInformation="TRUE" SubSystem="2" OptimizeReferences="2" EnableCOMDATFolding="2" TargetMachine="1"/> <Tool Name="VCMIDLTool" PreprocessorDefinitions="NDEBUG" MkTypLibCompatible="FALSE"/> <Tool Name="VCPostBuildEventTool"/> <Tool Name="VCPreBuildEventTool"/> <Tool Name="VCPreLinkEventTool"/> <Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="NDEBUG" Culture="1033" AdditionalIncludeDirectories="$(IntDir)"/> <Tool Name="VCWebServiceProxyGeneratorTool"/> <Tool Name="VCWebDeploymentTool"/> </Configuration> </Configurations> <Files> <Filter Name="Source Files" Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm"> <File RelativePath="SWizard.cpp"> </File> <File RelativePath="SWizardDlg.cpp"> </File> <File RelativePath="stdafx.cpp"> <FileConfiguration Name="Debug|Win32"> <Tool Name="VCCLCompilerTool" UsePrecompiledHeader="1"/> </FileConfiguration> <FileConfiguration Name="Release|Win32"> <Tool Name="VCCLCompilerTool" UsePrecompiledHeader="1"/> </FileConfiguration> </File> </Filter> <Filter Name="Header Files" Filter="h;hpp;hxx;hm;inl;inc"> <File RelativePath="Resource.h"> </File> <File RelativePath="SWizard.h"> </File> <File RelativePath="SWizardDlg.h"> </File> <File RelativePath="stdafx.h"> </File> </Filter> <Filter Name="Resource Files" Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;jpg;jpeg;jpe;manifest"> <File RelativePath="res\SWizard.ico"> </File> <File RelativePath="res\SWizard.manifest"> </File> <File RelativePath="SWizard.rc"> </File> <File RelativePath="res\SWizard.rc2"> </File> </Filter> <File RelativePath="ReadMe.txt"> </File> </Files> <Globals> </Globals> </VisualStudioProject> --- NEW FILE: SWizardDlg.cpp --- // SWizardDlg.cpp : implementation file // #include "stdafx.h" #include "SWizard.h" #include "SWizardDlg.h" #ifdef _DEBUG #define new DEBUG_NEW #endif // CAboutDlg dialog used for App About class CAboutDlg : public CDialog { public: CAboutDlg(); [...2996 lines suppressed...] return; } FileWrite(f, _T("// stdafx.cpp : source file that includes just the standard includes\n")); FileWrite(f, _T("// %s.pch will be the pre-compiled header\n"), m_sLibrary); FileWrite(f, _T("// stdafx.obj will contain the pre-compiled type information\n")); FileWrite(f, _T("\n")); FileWrite(f, _T("#include \"stdafx.h\"\n")); f.Close(); } void CSWizardDlg::FileWrite(CStdioFile &f, const char *format, ...) { CString s; va_list vargs; va_start(vargs, format); s.FormatV(format, vargs); va_end(vargs); f.WriteString(s); } --- NEW FILE: SWizardDlg.h --- // SWizardDlg.h : header file // #pragma once #include "afxwin.h" // CSWizardDlg dialog class CSWizardDlg : public CDialog { // Construction public: CSWizardDlg(CWnd* pParent = NULL); // standard constructor // Dialog Data enum { IDD = IDD_SWIZARD_DIALOG }; protected: virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support // Implementation protected: HICON m_hIcon; // Generated message map functions virtual BOOL OnInitDialog(); afx_msg void OnSysCommand(UINT nID, LPARAM lParam); afx_msg void OnPaint(); afx_msg HCURSOR OnQueryDragIcon(); DECLARE_MESSAGE_MAP() int BuildFilesCPlusPlus(); int BuildFilesCSharp(); int BuildFilesVB(); void GenerateGUIDs(); CString MakeGUID(); CString m_sInterfaceGUID; CString m_sTlbGUID; CString m_sClassGUID; CString m_sCompRegGUID; CString m_sCompRegInterfaceGUID; CString m_sAppIDResourceGUID; CString m_sProjectGUID; CString m_sPath; CString m_sClass; CString m_sLibrary; CString m_sClassUpper; CString m_sLibraryUpper; // Functions to build C++ files void BuildCDllDataFiles(); void BuildCClassFiles(); void BuildCTlbFiles(); void BuildCProjectFiles(); void BuildCExtraFiles(); // Functions to build C# files // Functions to build VB files // Other functions void FileWrite(CStdioFile &f, const char * format, ...); public: afx_msg void OnBnClickedBrowsepath(); afx_msg void OnBnClickedCreatefiles(); CEdit m_eOutput; CEdit m_eLibraryName; CEdit m_eClassName; CEdit m_eStatus; }; |